/*********************************************************************************************************************
* CYT2BL3 Opensourec Library 即（ CYT2BL3 开源库）是一个基于官方 SDK 接口的第三方开源库
* Copyright (c) 2022 SEEKFREE 逐飞科技
*
* 本文件是 CYT2BL3 开源库的一部分
*
* CYT2BL3 开源库 是免费软件
* 您可以根据自由软件基金会发布的 GPL（GNU General Public License，即 GNU通用公共许可证）的条款
* 即 GPL 的第3版（即 GPL3.0）或（您选择的）任何后来的版本，重新发布和/或修改它
*
* 本开源库的发布是希望它能发挥作用，但并未对其作任何的保证
* 甚至没有隐含的适销性或适合特定用途的保证
* 更多细节请参见 GPL
*
* 您应该在收到本开源库的同时收到一份 GPL 的副本
* 如果没有，请参阅<https://www.gnu.org/licenses/>
*
* 额外注明：
* 本开源库使用 GPL3.0 开源许可证协议 以上许可申明为译文版本
* 许可申明英文版在 libraries/doc 文件夹下的 GPL3_permission_statement.txt 文件中
* 许可证副本在 libraries 文件夹下 即该文件夹下的 LICENSE 文件
* 欢迎各位使用并传播本程序 但修改内容时必须保留逐飞科技的版权声明（即本声明）
*
* 文件名称          fast_foc
* 公司名称          成都逐飞科技有限公司
* 版本信息          查看 libraries/doc 文件夹内 version 文件 版本说明
* 开发环境          IAR 9.40.1
* 适用平台          CYT2BL3
* 店铺链接          https://seekfree.taobao.com/
*
* 修改记录
* 日期              作者                备注
* 2025-01-03       pudding            first version
********************************************************************************************************************/

#include "fast_foc.h"

#define FAST_FOC_ENCODER_MAX    (uint16)(65535)                                         // 定义默认磁编码器的最大值 最大支持 16位磁编码

#define FAST_FOC_POLE_PAIRS     (uint16)(7)                                             // 定义默认的电机极对数 通过极对数计算电角度

#define FAST_FOC_ARRAY_LENGTH   (uint16)(FAST_FOC_ENCODER_MAX / FAST_FOC_POLE_PAIRS)    // 定义查表数组长度 磁编码器最大值 / 极对数

#define FAST_FOC_PHASE_OFFSET   (uint16)(FAST_FOC_ARRAY_LENGTH / 3)                     // 定义相位偏差值 三相波形相差120度 

#define FAST_FOC_DUTY_MAX       (uint16)(10000)                                         // 定义输出的最大占空比

#define fast_foc_limit_ab(x, a, b)  ((x) < (a) ? (a) : ((x) > (b) ? (b) : (x)))         // FAST_FOC 宏定义限幅函数

#if     USE_SIN_DATA == 1
// 生成的 正弦波查表数组 
const uint16 foc_output_array[FAST_FOC_ARRAY_LENGTH] = {
    5000, 5003, 5006, 5010, 5013, 5016, 5020, 5023, 5026, 5030, 5033, 5036, 5040, 5043, 5046, 5050, 
    5053, 5057, 5060, 5063, 5067, 5070, 5073, 5077, 5080, 5083, 5087, 5090, 5093, 5097, 5100, 5104, 
    5107, 5110, 5114, 5117, 5120, 5124, 5127, 5130, 5134, 5137, 5140, 5144, 5147, 5150, 5154, 5157, 
    5161, 5164, 5167, 5171, 5174, 5177, 5181, 5184, 5187, 5191, 5194, 5197, 5201, 5204, 5207, 5211, 
    5214, 5218, 5221, 5224, 5228, 5231, 5234, 5238, 5241, 5244, 5248, 5251, 5254, 5258, 5261, 5264, 
    5268, 5271, 5275, 5278, 5281, 5285, 5288, 5291, 5295, 5298, 5301, 5305, 5308, 5311, 5315, 5318, 
    5321, 5325, 5328, 5331, 5335, 5338, 5342, 5345, 5348, 5352, 5355, 5358, 5362, 5365, 5368, 5372, 
    5375, 5378, 5382, 5385, 5388, 5392, 5395, 5398, 5402, 5405, 5408, 5412, 5415, 5418, 5422, 5425, 
    5428, 5432, 5435, 5439, 5442, 5445, 5449, 5452, 5455, 5459, 5462, 5465, 5469, 5472, 5475, 5479, 
    5482, 5485, 5489, 5492, 5495, 5499, 5502, 5505, 5509, 5512, 5515, 5519, 5522, 5525, 5529, 5532, 
    5535, 5539, 5542, 5545, 5549, 5552, 5555, 5559, 5562, 5565, 5569, 5572, 5575, 5579, 5582, 5585, 
    5589, 5592, 5595, 5599, 5602, 5605, 5609, 5612, 5615, 5619, 5622, 5625, 5629, 5632, 5635, 5639, 
    5642, 5645, 5649, 5652, 5655, 5659, 5662, 5665, 5669, 5672, 5675, 5679, 5682, 5685, 5689, 5692, 
    5695, 5699, 5702, 5705, 5709, 5712, 5715, 5718, 5722, 5725, 5728, 5732, 5735, 5738, 5742, 5745, 
    5748, 5752, 5755, 5758, 5762, 5765, 5768, 5772, 5775, 5778, 5782, 5785, 5788, 5791, 5795, 5798, 
    5801, 5805, 5808, 5811, 5815, 5818, 5821, 5825, 5828, 5831, 5834, 5838, 5841, 5844, 5848, 5851, 
    5854, 5858, 5861, 5864, 5868, 5871, 5874, 5877, 5881, 5884, 5887, 5891, 5894, 5897, 5901, 5904, 
    5907, 5910, 5914, 5917, 5920, 5924, 5927, 5930, 5934, 5937, 5940, 5943, 5947, 5950, 5953, 5957, 
    5960, 5963, 5967, 5970, 5973, 5976, 5980, 5983, 5986, 5990, 5993, 5996, 5999, 6003, 6006, 6009, 
    6013, 6016, 6019, 6022, 6026, 6029, 6032, 6036, 6039, 6042, 6045, 6049, 6052, 6055, 6059, 6062, 
    6065, 6068, 6072, 6075, 6078, 6081, 6085, 6088, 6091, 6095, 6098, 6101, 6104, 6108, 6111, 6114, 
    6117, 6121, 6124, 6127, 6131, 6134, 6137, 6140, 6144, 6147, 6150, 6153, 6157, 6160, 6163, 6166, 
    6170, 6173, 6176, 6180, 6183, 6186, 6189, 6193, 6196, 6199, 6202, 6206, 6209, 6212, 6215, 6219, 
    6222, 6225, 6228, 6232, 6235, 6238, 6241, 6245, 6248, 6251, 6254, 6258, 6261, 6264, 6267, 6271, 
    6274, 6277, 6280, 6284, 6287, 6290, 6293, 6297, 6300, 6303, 6306, 6310, 6313, 6316, 6319, 6322, 
    6326, 6329, 6332, 6335, 6339, 6342, 6345, 6348, 6352, 6355, 6358, 6361, 6364, 6368, 6371, 6374, 
    6377, 6381, 6384, 6387, 6390, 6394, 6397, 6400, 6403, 6406, 6410, 6413, 6416, 6419, 6422, 6426, 
    6429, 6432, 6435, 6439, 6442, 6445, 6448, 6451, 6455, 6458, 6461, 6464, 6467, 6471, 6474, 6477, 
    6480, 6484, 6487, 6490, 6493, 6496, 6500, 6503, 6506, 6509, 6512, 6516, 6519, 6522, 6525, 6528, 
    6531, 6535, 6538, 6541, 6544, 6547, 6551, 6554, 6557, 6560, 6563, 6567, 6570, 6573, 6576, 6579, 
    6583, 6586, 6589, 6592, 6595, 6598, 6602, 6605, 6608, 6611, 6614, 6617, 6621, 6624, 6627, 6630, 
    6633, 6637, 6640, 6643, 6646, 6649, 6652, 6656, 6659, 6662, 6665, 6668, 6671, 6675, 6678, 6681, 
    6684, 6687, 6690, 6693, 6697, 6700, 6703, 6706, 6709, 6712, 6716, 6719, 6722, 6725, 6728, 6731, 
    6734, 6738, 6741, 6744, 6747, 6750, 6753, 6756, 6760, 6763, 6766, 6769, 6772, 6775, 6778, 6782, 
    6785, 6788, 6791, 6794, 6797, 6800, 6803, 6807, 6810, 6813, 6816, 6819, 6822, 6825, 6829, 6832, 
    6835, 6838, 6841, 6844, 6847, 6850, 6853, 6857, 6860, 6863, 6866, 6869, 6872, 6875, 6878, 6881, 
    6885, 6888, 6891, 6894, 6897, 6900, 6903, 6906, 6909, 6913, 6916, 6919, 6922, 6925, 6928, 6931, 
    6934, 6937, 6940, 6943, 6947, 6950, 6953, 6956, 6959, 6962, 6965, 6968, 6971, 6974, 6977, 6981, 
    6984, 6987, 6990, 6993, 6996, 6999, 7002, 7005, 7008, 7011, 7014, 7017, 7021, 7024, 7027, 7030, 
    7033, 7036, 7039, 7042, 7045, 7048, 7051, 7054, 7057, 7060, 7063, 7066, 7069, 7073, 7076, 7079, 
    7082, 7085, 7088, 7091, 7094, 7097, 7100, 7103, 7106, 7109, 7112, 7115, 7118, 7121, 7124, 7127, 
    7130, 7133, 7136, 7140, 7143, 7146, 7149, 7152, 7155, 7158, 7161, 7164, 7167, 7170, 7173, 7176, 
    7179, 7182, 7185, 7188, 7191, 7194, 7197, 7200, 7203, 7206, 7209, 7212, 7215, 7218, 7221, 7224, 
    7227, 7230, 7233, 7236, 7239, 7242, 7245, 7248, 7251, 7254, 7257, 7260, 7263, 7266, 7269, 7272, 
    7275, 7278, 7281, 7284, 7287, 7290, 7293, 7296, 7299, 7302, 7305, 7308, 7311, 7314, 7317, 7320, 
    7323, 7326, 7329, 7332, 7335, 7338, 7340, 7343, 7346, 7349, 7352, 7355, 7358, 7361, 7364, 7367, 
    7370, 7373, 7376, 7379, 7382, 7385, 7388, 7391, 7394, 7397, 7400, 7403, 7405, 7408, 7411, 7414, 
    7417, 7420, 7423, 7426, 7429, 7432, 7435, 7438, 7441, 7444, 7447, 7449, 7452, 7455, 7458, 7461, 
    7464, 7467, 7470, 7473, 7476, 7479, 7482, 7484, 7487, 7490, 7493, 7496, 7499, 7502, 7505, 7508, 
    7511, 7514, 7516, 7519, 7522, 7525, 7528, 7531, 7534, 7537, 7540, 7542, 7545, 7548, 7551, 7554, 
    7557, 7560, 7563, 7566, 7568, 7571, 7574, 7577, 7580, 7583, 7586, 7589, 7591, 7594, 7597, 7600, 
    7603, 7606, 7609, 7611, 7614, 7617, 7620, 7623, 7626, 7629, 7631, 7634, 7637, 7640, 7643, 7646, 
    7649, 7651, 7654, 7657, 7660, 7663, 7666, 7668, 7671, 7674, 7677, 7680, 7683, 7685, 7688, 7691, 
    7694, 7697, 7700, 7702, 7705, 7708, 7711, 7714, 7717, 7719, 7722, 7725, 7728, 7731, 7733, 7736, 
    7739, 7742, 7745, 7747, 7750, 7753, 7756, 7759, 7761, 7764, 7767, 7770, 7773, 7775, 7778, 7781, 
    7784, 7787, 7789, 7792, 7795, 7798, 7801, 7803, 7806, 7809, 7812, 7814, 7817, 7820, 7823, 7825, 
    7828, 7831, 7834, 7837, 7839, 7842, 7845, 7848, 7850, 7853, 7856, 7859, 7861, 7864, 7867, 7870, 
    7872, 7875, 7878, 7881, 7883, 7886, 7889, 7892, 7894, 7897, 7900, 7902, 7905, 7908, 7911, 7913, 
    7916, 7919, 7922, 7924, 7927, 7930, 7932, 7935, 7938, 7941, 7943, 7946, 7949, 7951, 7954, 7957, 
    7960, 7962, 7965, 7968, 7970, 7973, 7976, 7978, 7981, 7984, 7987, 7989, 7992, 7995, 7997, 8000, 
    8003, 8005, 8008, 8011, 8013, 8016, 8019, 8021, 8024, 8027, 8029, 8032, 8035, 8037, 8040, 8043, 
    8045, 8048, 8051, 8053, 8056, 8059, 8061, 8064, 8067, 8069, 8072, 8075, 8077, 8080, 8083, 8085, 
    8088, 8090, 8093, 8096, 8098, 8101, 8104, 8106, 8109, 8112, 8114, 8117, 8119, 8122, 8125, 8127, 
    8130, 8132, 8135, 8138, 8140, 8143, 8146, 8148, 8151, 8153, 8156, 8159, 8161, 8164, 8166, 8169, 
    8172, 8174, 8177, 8179, 8182, 8184, 8187, 8190, 8192, 8195, 8197, 8200, 8203, 8205, 8208, 8210, 
    8213, 8215, 8218, 8221, 8223, 8226, 8228, 8231, 8233, 8236, 8239, 8241, 8244, 8246, 8249, 8251, 
    8254, 8256, 8259, 8261, 8264, 8267, 8269, 8272, 8274, 8277, 8279, 8282, 8284, 8287, 8289, 8292, 
    8294, 8297, 8299, 8302, 8304, 8307, 8310, 8312, 8315, 8317, 8320, 8322, 8325, 8327, 8330, 8332, 
    8335, 8337, 8340, 8342, 8345, 8347, 8350, 8352, 8355, 8357, 8360, 8362, 8364, 8367, 8369, 8372, 
    8374, 8377, 8379, 8382, 8384, 8387, 8389, 8392, 8394, 8397, 8399, 8402, 8404, 8406, 8409, 8411, 
    8414, 8416, 8419, 8421, 8424, 8426, 8428, 8431, 8433, 8436, 8438, 8441, 8443, 8446, 8448, 8450, 
    8453, 8455, 8458, 8460, 8463, 8465, 8467, 8470, 8472, 8475, 8477, 8479, 8482, 8484, 8487, 8489, 
    8491, 8494, 8496, 8499, 8501, 8503, 8506, 8508, 8511, 8513, 8515, 8518, 8520, 8523, 8525, 8527, 
    8530, 8532, 8534, 8537, 8539, 8542, 8544, 8546, 8549, 8551, 8553, 8556, 8558, 8560, 8563, 8565, 
    8568, 8570, 8572, 8575, 8577, 8579, 8582, 8584, 8586, 8589, 8591, 8593, 8596, 8598, 8600, 8603, 
    8605, 8607, 8610, 8612, 8614, 8617, 8619, 8621, 8623, 8626, 8628, 8630, 8633, 8635, 8637, 8640, 
    8642, 8644, 8647, 8649, 8651, 8653, 8656, 8658, 8660, 8663, 8665, 8667, 8669, 8672, 8674, 8676, 
    8678, 8681, 8683, 8685, 8688, 8690, 8692, 8694, 8697, 8699, 8701, 8703, 8706, 8708, 8710, 8712, 
    8715, 8717, 8719, 8721, 8724, 8726, 8728, 8730, 8733, 8735, 8737, 8739, 8741, 8744, 8746, 8748, 
    8750, 8753, 8755, 8757, 8759, 8761, 8764, 8766, 8768, 8770, 8772, 8775, 8777, 8779, 8781, 8783, 
    8786, 8788, 8790, 8792, 8794, 8797, 8799, 8801, 8803, 8805, 8807, 8810, 8812, 8814, 8816, 8818, 
    8820, 8823, 8825, 8827, 8829, 8831, 8833, 8836, 8838, 8840, 8842, 8844, 8846, 8848, 8851, 8853, 
    8855, 8857, 8859, 8861, 8863, 8866, 8868, 8870, 8872, 8874, 8876, 8878, 8880, 8883, 8885, 8887, 
    8889, 8891, 8893, 8895, 8897, 8899, 8901, 8904, 8906, 8908, 8910, 8912, 8914, 8916, 8918, 8920, 
    8922, 8924, 8927, 8929, 8931, 8933, 8935, 8937, 8939, 8941, 8943, 8945, 8947, 8949, 8951, 8953, 
    8955, 8957, 8960, 8962, 8964, 8966, 8968, 8970, 8972, 8974, 8976, 8978, 8980, 8982, 8984, 8986, 
    8988, 8990, 8992, 8994, 8996, 8998, 9000, 9002, 9004, 9006, 9008, 9010, 9012, 9014, 9016, 9018, 
    9020, 9022, 9024, 9026, 9028, 9030, 9032, 9034, 9036, 9038, 9040, 9042, 9044, 9046, 9048, 9050, 
    9052, 9054, 9056, 9058, 9060, 9062, 9064, 9066, 9068, 9069, 9071, 9073, 9075, 9077, 9079, 9081, 
    9083, 9085, 9087, 9089, 9091, 9093, 9095, 9097, 9099, 9100, 9102, 9104, 9106, 9108, 9110, 9112, 
    9114, 9116, 9118, 9120, 9121, 9123, 9125, 9127, 9129, 9131, 9133, 9135, 9137, 9138, 9140, 9142, 
    9144, 9146, 9148, 9150, 9152, 9153, 9155, 9157, 9159, 9161, 9163, 9165, 9166, 9168, 9170, 9172, 
    9174, 9176, 9178, 9179, 9181, 9183, 9185, 9187, 9189, 9190, 9192, 9194, 9196, 9198, 9200, 9201, 
    9203, 9205, 9207, 9209, 9210, 9212, 9214, 9216, 9218, 9219, 9221, 9223, 9225, 9227, 9228, 9230, 
    9232, 9234, 9236, 9237, 9239, 9241, 9243, 9244, 9246, 9248, 9250, 9252, 9253, 9255, 9257, 9259, 
    9260, 9262, 9264, 9266, 9267, 9269, 9271, 9273, 9274, 9276, 9278, 9280, 9281, 9283, 9285, 9286, 
    9288, 9290, 9292, 9293, 9295, 9297, 9299, 9300, 9302, 9304, 9305, 9307, 9309, 9310, 9312, 9314, 
    9316, 9317, 9319, 9321, 9322, 9324, 9326, 9327, 9329, 9331, 9332, 9334, 9336, 9337, 9339, 9341, 
    9342, 9344, 9346, 9347, 9349, 9351, 9352, 9354, 9356, 9357, 9359, 9361, 9362, 9364, 9366, 9367, 
    9369, 9370, 9372, 9374, 9375, 9377, 9379, 9380, 9382, 9383, 9385, 9387, 9388, 9390, 9391, 9393, 
    9395, 9396, 9398, 9399, 9401, 9403, 9404, 9406, 9407, 9409, 9411, 9412, 9414, 9415, 9417, 9418, 
    9420, 9422, 9423, 9425, 9426, 9428, 9429, 9431, 9432, 9434, 9436, 9437, 9439, 9440, 9442, 9443, 
    9445, 9446, 9448, 9449, 9451, 9452, 9454, 9456, 9457, 9459, 9460, 9462, 9463, 9465, 9466, 9468, 
    9469, 9471, 9472, 9474, 9475, 9477, 9478, 9480, 9481, 9483, 9484, 9486, 9487, 9489, 9490, 9491, 
    9493, 9494, 9496, 9497, 9499, 9500, 9502, 9503, 9505, 9506, 9508, 9509, 9510, 9512, 9513, 9515, 
    9516, 9518, 9519, 9521, 9522, 9523, 9525, 9526, 9528, 9529, 9531, 9532, 9533, 9535, 9536, 9538, 
    9539, 9540, 9542, 9543, 9545, 9546, 9547, 9549, 9550, 9552, 9553, 9554, 9556, 9557, 9558, 9560, 
    9561, 9563, 9564, 9565, 9567, 9568, 9569, 9571, 9572, 9574, 9575, 9576, 9578, 9579, 9580, 9582, 
    9583, 9584, 9586, 9587, 9588, 9590, 9591, 9592, 9594, 9595, 9596, 9598, 9599, 9600, 9602, 9603, 
    9604, 9605, 9607, 9608, 9609, 9611, 9612, 9613, 9615, 9616, 9617, 9618, 9620, 9621, 9622, 9624, 
    9625, 9626, 9627, 9629, 9630, 9631, 9632, 9634, 9635, 9636, 9637, 9639, 9640, 9641, 9642, 9644, 
    9645, 9646, 9647, 9649, 9650, 9651, 9652, 9654, 9655, 9656, 9657, 9658, 9660, 9661, 9662, 9663, 
    9665, 9666, 9667, 9668, 9669, 9671, 9672, 9673, 9674, 9675, 9677, 9678, 9679, 9680, 9681, 9682, 
    9684, 9685, 9686, 9687, 9688, 9689, 9691, 9692, 9693, 9694, 9695, 9696, 9698, 9699, 9700, 9701, 
    9702, 9703, 9704, 9706, 9707, 9708, 9709, 9710, 9711, 9712, 9713, 9715, 9716, 9717, 9718, 9719, 
    9720, 9721, 9722, 9723, 9724, 9726, 9727, 9728, 9729, 9730, 9731, 9732, 9733, 9734, 9735, 9736, 
    9737, 9739, 9740, 9741, 9742, 9743, 9744, 9745, 9746, 9747, 9748, 9749, 9750, 9751, 9752, 9753, 
    9754, 9755, 9756, 9757, 9759, 9760, 9761, 9762, 9763, 9764, 9765, 9766, 9767, 9768, 9769, 9770, 
    9771, 9772, 9773, 9774, 9775, 9776, 9777, 9778, 9779, 9780, 9781, 9782, 9783, 9784, 9785, 9786, 
    9786, 9787, 9788, 9789, 9790, 9791, 9792, 9793, 9794, 9795, 9796, 9797, 9798, 9799, 9800, 9801, 
    9802, 9803, 9804, 9805, 9805, 9806, 9807, 9808, 9809, 9810, 9811, 9812, 9813, 9814, 9815, 9815, 
    9816, 9817, 9818, 9819, 9820, 9821, 9822, 9823, 9824, 9824, 9825, 9826, 9827, 9828, 9829, 9830, 
    9831, 9831, 9832, 9833, 9834, 9835, 9836, 9837, 9837, 9838, 9839, 9840, 9841, 9842, 9842, 9843, 
    9844, 9845, 9846, 9847, 9847, 9848, 9849, 9850, 9851, 9851, 9852, 9853, 9854, 9855, 9855, 9856, 
    9857, 9858, 9859, 9859, 9860, 9861, 9862, 9863, 9863, 9864, 9865, 9866, 9866, 9867, 9868, 9869, 
    9870, 9870, 9871, 9872, 9873, 9873, 9874, 9875, 9876, 9876, 9877, 9878, 9878, 9879, 9880, 9881, 
    9881, 9882, 9883, 9884, 9884, 9885, 9886, 9886, 9887, 9888, 9889, 9889, 9890, 9891, 9891, 9892, 
    9893, 9893, 9894, 9895, 9895, 9896, 9897, 9897, 9898, 9899, 9900, 9900, 9901, 9901, 9902, 9903, 
    9903, 9904, 9905, 9905, 9906, 9907, 9907, 9908, 9909, 9909, 9910, 9911, 9911, 9912, 9912, 9913, 
    9914, 9914, 9915, 9916, 9916, 9917, 9917, 9918, 9919, 9919, 9920, 9920, 9921, 9922, 9922, 9923, 
    9923, 9924, 9924, 9925, 9926, 9926, 9927, 9927, 9928, 9928, 9929, 9930, 9930, 9931, 9931, 9932, 
    9932, 9933, 9933, 9934, 9935, 9935, 9936, 9936, 9937, 9937, 9938, 9938, 9939, 9939, 9940, 9940, 
    9941, 9941, 9942, 9942, 9943, 9943, 9944, 9944, 9945, 9945, 9946, 9946, 9947, 9947, 9948, 9948, 
    9949, 9949, 9950, 9950, 9951, 9951, 9952, 9952, 9952, 9953, 9953, 9954, 9954, 9955, 9955, 9956, 
    9956, 9957, 9957, 9957, 9958, 9958, 9959, 9959, 9960, 9960, 9960, 9961, 9961, 9962, 9962, 9962, 
    9963, 9963, 9964, 9964, 9964, 9965, 9965, 9966, 9966, 9966, 9967, 9967, 9968, 9968, 9968, 9969, 
    9969, 9969, 9970, 9970, 9971, 9971, 9971, 9972, 9972, 9972, 9973, 9973, 9973, 9974, 9974, 9974, 
    9975, 9975, 9975, 9976, 9976, 9976, 9977, 9977, 9977, 9978, 9978, 9978, 9979, 9979, 9979, 9979, 
    9980, 9980, 9980, 9981, 9981, 9981, 9981, 9982, 9982, 9982, 9983, 9983, 9983, 9983, 9984, 9984, 
    9984, 9984, 9985, 9985, 9985, 9986, 9986, 9986, 9986, 9986, 9987, 9987, 9987, 9987, 9988, 9988, 
    9988, 9988, 9989, 9989, 9989, 9989, 9989, 9990, 9990, 9990, 9990, 9990, 9991, 9991, 9991, 9991, 
    9991, 9992, 9992, 9992, 9992, 9992, 9993, 9993, 9993, 9993, 9993, 9993, 9994, 9994, 9994, 9994, 
    9994, 9994, 9995, 9995, 9995, 9995, 9995, 9995, 9995, 9996, 9996, 9996, 9996, 9996, 9996, 9996, 
    9996, 9997, 9997, 9997, 9997, 9997, 9997, 9997, 9997, 9997, 9997, 9998, 9998, 9998, 9998, 9998, 
    9998, 9998, 9998, 9998, 9998, 9998, 9998, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 
    9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 
    9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 
    9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 
    9999, 9999, 9999, 9998, 9998, 9998, 9998, 9998, 9998, 9998, 9998, 9998, 9998, 9998, 9998, 9997, 
    9997, 9997, 9997, 9997, 9997, 9997, 9997, 9997, 9997, 9996, 9996, 9996, 9996, 9996, 9996, 9996, 
    9996, 9995, 9995, 9995, 9995, 9995, 9995, 9995, 9994, 9994, 9994, 9994, 9994, 9994, 9993, 9993, 
    9993, 9993, 9993, 9993, 9992, 9992, 9992, 9992, 9992, 9991, 9991, 9991, 9991, 9991, 9990, 9990, 
    9990, 9990, 9990, 9989, 9989, 9989, 9989, 9989, 9988, 9988, 9988, 9988, 9987, 9987, 9987, 9987, 
    9986, 9986, 9986, 9986, 9986, 9985, 9985, 9985, 9984, 9984, 9984, 9984, 9983, 9983, 9983, 9983, 
    9982, 9982, 9982, 9981, 9981, 9981, 9981, 9980, 9980, 9980, 9979, 9979, 9979, 9979, 9978, 9978, 
    9978, 9977, 9977, 9977, 9976, 9976, 9976, 9975, 9975, 9975, 9974, 9974, 9974, 9973, 9973, 9973, 
    9972, 9972, 9972, 9971, 9971, 9971, 9970, 9970, 9969, 9969, 9969, 9968, 9968, 9968, 9967, 9967, 
    9966, 9966, 9966, 9965, 9965, 9964, 9964, 9964, 9963, 9963, 9962, 9962, 9962, 9961, 9961, 9960, 
    9960, 9960, 9959, 9959, 9958, 9958, 9957, 9957, 9957, 9956, 9956, 9955, 9955, 9954, 9954, 9953, 
    9953, 9952, 9952, 9952, 9951, 9951, 9950, 9950, 9949, 9949, 9948, 9948, 9947, 9947, 9946, 9946, 
    9945, 9945, 9944, 9944, 9943, 9943, 9942, 9942, 9941, 9941, 9940, 9940, 9939, 9939, 9938, 9938, 
    9937, 9937, 9936, 9936, 9935, 9935, 9934, 9933, 9933, 9932, 9932, 9931, 9931, 9930, 9930, 9929, 
    9928, 9928, 9927, 9927, 9926, 9926, 9925, 9924, 9924, 9923, 9923, 9922, 9922, 9921, 9920, 9920, 
    9919, 9919, 9918, 9917, 9917, 9916, 9916, 9915, 9914, 9914, 9913, 9912, 9912, 9911, 9911, 9910, 
    9909, 9909, 9908, 9907, 9907, 9906, 9905, 9905, 9904, 9903, 9903, 9902, 9901, 9901, 9900, 9900, 
    9899, 9898, 9897, 9897, 9896, 9895, 9895, 9894, 9893, 9893, 9892, 9891, 9891, 9890, 9889, 9889, 
    9888, 9887, 9886, 9886, 9885, 9884, 9884, 9883, 9882, 9881, 9881, 9880, 9879, 9878, 9878, 9877, 
    9876, 9876, 9875, 9874, 9873, 9873, 9872, 9871, 9870, 9870, 9869, 9868, 9867, 9866, 9866, 9865, 
    9864, 9863, 9863, 9862, 9861, 9860, 9859, 9859, 9858, 9857, 9856, 9855, 9855, 9854, 9853, 9852, 
    9851, 9851, 9850, 9849, 9848, 9847, 9847, 9846, 9845, 9844, 9843, 9842, 9842, 9841, 9840, 9839, 
    9838, 9837, 9837, 9836, 9835, 9834, 9833, 9832, 9831, 9831, 9830, 9829, 9828, 9827, 9826, 9825, 
    9824, 9824, 9823, 9822, 9821, 9820, 9819, 9818, 9817, 9816, 9815, 9815, 9814, 9813, 9812, 9811, 
    9810, 9809, 9808, 9807, 9806, 9805, 9805, 9804, 9803, 9802, 9801, 9800, 9799, 9798, 9797, 9796, 
    9795, 9794, 9793, 9792, 9791, 9790, 9789, 9788, 9787, 9786, 9786, 9785, 9784, 9783, 9782, 9781, 
    9780, 9779, 9778, 9777, 9776, 9775, 9774, 9773, 9772, 9771, 9770, 9769, 9768, 9767, 9766, 9765, 
    9764, 9763, 9762, 9761, 9760, 9759, 9757, 9756, 9755, 9754, 9753, 9752, 9751, 9750, 9749, 9748, 
    9747, 9746, 9745, 9744, 9743, 9742, 9741, 9740, 9739, 9737, 9736, 9735, 9734, 9733, 9732, 9731, 
    9730, 9729, 9728, 9727, 9726, 9724, 9723, 9722, 9721, 9720, 9719, 9718, 9717, 9716, 9715, 9713, 
    9712, 9711, 9710, 9709, 9708, 9707, 9706, 9704, 9703, 9702, 9701, 9700, 9699, 9698, 9696, 9695, 
    9694, 9693, 9692, 9691, 9689, 9688, 9687, 9686, 9685, 9684, 9682, 9681, 9680, 9679, 9678, 9677, 
    9675, 9674, 9673, 9672, 9671, 9669, 9668, 9667, 9666, 9665, 9663, 9662, 9661, 9660, 9658, 9657, 
    9656, 9655, 9654, 9652, 9651, 9650, 9649, 9647, 9646, 9645, 9644, 9642, 9641, 9640, 9639, 9637, 
    9636, 9635, 9634, 9632, 9631, 9630, 9629, 9627, 9626, 9625, 9624, 9622, 9621, 9620, 9618, 9617, 
    9616, 9615, 9613, 9612, 9611, 9609, 9608, 9607, 9605, 9604, 9603, 9602, 9600, 9599, 9598, 9596, 
    9595, 9594, 9592, 9591, 9590, 9588, 9587, 9586, 9584, 9583, 9582, 9580, 9579, 9578, 9576, 9575, 
    9574, 9572, 9571, 9569, 9568, 9567, 9565, 9564, 9563, 9561, 9560, 9558, 9557, 9556, 9554, 9553, 
    9552, 9550, 9549, 9547, 9546, 9545, 9543, 9542, 9540, 9539, 9538, 9536, 9535, 9533, 9532, 9531, 
    9529, 9528, 9526, 9525, 9523, 9522, 9521, 9519, 9518, 9516, 9515, 9513, 9512, 9510, 9509, 9508, 
    9506, 9505, 9503, 9502, 9500, 9499, 9497, 9496, 9494, 9493, 9491, 9490, 9489, 9487, 9486, 9484, 
    9483, 9481, 9480, 9478, 9477, 9475, 9474, 9472, 9471, 9469, 9468, 9466, 9465, 9463, 9462, 9460, 
    9459, 9457, 9456, 9454, 9452, 9451, 9449, 9448, 9446, 9445, 9443, 9442, 9440, 9439, 9437, 9436, 
    9434, 9432, 9431, 9429, 9428, 9426, 9425, 9423, 9422, 9420, 9418, 9417, 9415, 9414, 9412, 9411, 
    9409, 9407, 9406, 9404, 9403, 9401, 9399, 9398, 9396, 9395, 9393, 9391, 9390, 9388, 9387, 9385, 
    9383, 9382, 9380, 9379, 9377, 9375, 9374, 9372, 9370, 9369, 9367, 9366, 9364, 9362, 9361, 9359, 
    9357, 9356, 9354, 9352, 9351, 9349, 9347, 9346, 9344, 9342, 9341, 9339, 9337, 9336, 9334, 9332, 
    9331, 9329, 9327, 9326, 9324, 9322, 9321, 9319, 9317, 9316, 9314, 9312, 9310, 9309, 9307, 9305, 
    9304, 9302, 9300, 9299, 9297, 9295, 9293, 9292, 9290, 9288, 9286, 9285, 9283, 9281, 9280, 9278, 
    9276, 9274, 9273, 9271, 9269, 9267, 9266, 9264, 9262, 9260, 9259, 9257, 9255, 9253, 9252, 9250, 
    9248, 9246, 9244, 9243, 9241, 9239, 9237, 9236, 9234, 9232, 9230, 9228, 9227, 9225, 9223, 9221, 
    9219, 9218, 9216, 9214, 9212, 9210, 9209, 9207, 9205, 9203, 9201, 9200, 9198, 9196, 9194, 9192, 
    9190, 9189, 9187, 9185, 9183, 9181, 9179, 9178, 9176, 9174, 9172, 9170, 9168, 9166, 9165, 9163, 
    9161, 9159, 9157, 9155, 9153, 9152, 9150, 9148, 9146, 9144, 9142, 9140, 9138, 9137, 9135, 9133, 
    9131, 9129, 9127, 9125, 9123, 9121, 9120, 9118, 9116, 9114, 9112, 9110, 9108, 9106, 9104, 9102, 
    9100, 9099, 9097, 9095, 9093, 9091, 9089, 9087, 9085, 9083, 9081, 9079, 9077, 9075, 9073, 9071, 
    9069, 9068, 9066, 9064, 9062, 9060, 9058, 9056, 9054, 9052, 9050, 9048, 9046, 9044, 9042, 9040, 
    9038, 9036, 9034, 9032, 9030, 9028, 9026, 9024, 9022, 9020, 9018, 9016, 9014, 9012, 9010, 9008, 
    9006, 9004, 9002, 9000, 8998, 8996, 8994, 8992, 8990, 8988, 8986, 8984, 8982, 8980, 8978, 8976, 
    8974, 8972, 8970, 8968, 8966, 8964, 8962, 8960, 8957, 8955, 8953, 8951, 8949, 8947, 8945, 8943, 
    8941, 8939, 8937, 8935, 8933, 8931, 8929, 8927, 8924, 8922, 8920, 8918, 8916, 8914, 8912, 8910, 
    8908, 8906, 8904, 8901, 8899, 8897, 8895, 8893, 8891, 8889, 8887, 8885, 8883, 8880, 8878, 8876, 
    8874, 8872, 8870, 8868, 8866, 8863, 8861, 8859, 8857, 8855, 8853, 8851, 8848, 8846, 8844, 8842, 
    8840, 8838, 8836, 8833, 8831, 8829, 8827, 8825, 8823, 8820, 8818, 8816, 8814, 8812, 8810, 8807, 
    8805, 8803, 8801, 8799, 8797, 8794, 8792, 8790, 8788, 8786, 8783, 8781, 8779, 8777, 8775, 8772, 
    8770, 8768, 8766, 8764, 8761, 8759, 8757, 8755, 8753, 8750, 8748, 8746, 8744, 8741, 8739, 8737, 
    8735, 8733, 8730, 8728, 8726, 8724, 8721, 8719, 8717, 8715, 8712, 8710, 8708, 8706, 8703, 8701, 
    8699, 8697, 8694, 8692, 8690, 8688, 8685, 8683, 8681, 8678, 8676, 8674, 8672, 8669, 8667, 8665, 
    8663, 8660, 8658, 8656, 8653, 8651, 8649, 8647, 8644, 8642, 8640, 8637, 8635, 8633, 8630, 8628, 
    8626, 8623, 8621, 8619, 8617, 8614, 8612, 8610, 8607, 8605, 8603, 8600, 8598, 8596, 8593, 8591, 
    8589, 8586, 8584, 8582, 8579, 8577, 8575, 8572, 8570, 8568, 8565, 8563, 8560, 8558, 8556, 8553, 
    8551, 8549, 8546, 8544, 8542, 8539, 8537, 8534, 8532, 8530, 8527, 8525, 8523, 8520, 8518, 8515, 
    8513, 8511, 8508, 8506, 8503, 8501, 8499, 8496, 8494, 8491, 8489, 8487, 8484, 8482, 8479, 8477, 
    8475, 8472, 8470, 8467, 8465, 8463, 8460, 8458, 8455, 8453, 8450, 8448, 8446, 8443, 8441, 8438, 
    8436, 8433, 8431, 8428, 8426, 8424, 8421, 8419, 8416, 8414, 8411, 8409, 8406, 8404, 8402, 8399, 
    8397, 8394, 8392, 8389, 8387, 8384, 8382, 8379, 8377, 8374, 8372, 8369, 8367, 8364, 8362, 8360, 
    8357, 8355, 8352, 8350, 8347, 8345, 8342, 8340, 8337, 8335, 8332, 8330, 8327, 8325, 8322, 8320, 
    8317, 8315, 8312, 8310, 8307, 8304, 8302, 8299, 8297, 8294, 8292, 8289, 8287, 8284, 8282, 8279, 
    8277, 8274, 8272, 8269, 8267, 8264, 8261, 8259, 8256, 8254, 8251, 8249, 8246, 8244, 8241, 8239, 
    8236, 8233, 8231, 8228, 8226, 8223, 8221, 8218, 8215, 8213, 8210, 8208, 8205, 8203, 8200, 8197, 
    8195, 8192, 8190, 8187, 8184, 8182, 8179, 8177, 8174, 8172, 8169, 8166, 8164, 8161, 8159, 8156, 
    8153, 8151, 8148, 8146, 8143, 8140, 8138, 8135, 8132, 8130, 8127, 8125, 8122, 8119, 8117, 8114, 
    8112, 8109, 8106, 8104, 8101, 8098, 8096, 8093, 8090, 8088, 8085, 8083, 8080, 8077, 8075, 8072, 
    8069, 8067, 8064, 8061, 8059, 8056, 8053, 8051, 8048, 8045, 8043, 8040, 8037, 8035, 8032, 8029, 
    8027, 8024, 8021, 8019, 8016, 8013, 8011, 8008, 8005, 8003, 8000, 7997, 7995, 7992, 7989, 7987, 
    7984, 7981, 7978, 7976, 7973, 7970, 7968, 7965, 7962, 7960, 7957, 7954, 7951, 7949, 7946, 7943, 
    7941, 7938, 7935, 7932, 7930, 7927, 7924, 7922, 7919, 7916, 7913, 7911, 7908, 7905, 7902, 7900, 
    7897, 7894, 7892, 7889, 7886, 7883, 7881, 7878, 7875, 7872, 7870, 7867, 7864, 7861, 7859, 7856, 
    7853, 7850, 7848, 7845, 7842, 7839, 7837, 7834, 7831, 7828, 7825, 7823, 7820, 7817, 7814, 7812, 
    7809, 7806, 7803, 7801, 7798, 7795, 7792, 7789, 7787, 7784, 7781, 7778, 7775, 7773, 7770, 7767, 
    7764, 7761, 7759, 7756, 7753, 7750, 7747, 7745, 7742, 7739, 7736, 7733, 7731, 7728, 7725, 7722, 
    7719, 7717, 7714, 7711, 7708, 7705, 7702, 7700, 7697, 7694, 7691, 7688, 7685, 7683, 7680, 7677, 
    7674, 7671, 7668, 7666, 7663, 7660, 7657, 7654, 7651, 7649, 7646, 7643, 7640, 7637, 7634, 7631, 
    7629, 7626, 7623, 7620, 7617, 7614, 7611, 7609, 7606, 7603, 7600, 7597, 7594, 7591, 7589, 7586, 
    7583, 7580, 7577, 7574, 7571, 7568, 7566, 7563, 7560, 7557, 7554, 7551, 7548, 7545, 7542, 7540, 
    7537, 7534, 7531, 7528, 7525, 7522, 7519, 7516, 7514, 7511, 7508, 7505, 7502, 7499, 7496, 7493, 
    7490, 7487, 7484, 7482, 7479, 7476, 7473, 7470, 7467, 7464, 7461, 7458, 7455, 7452, 7449, 7447, 
    7444, 7441, 7438, 7435, 7432, 7429, 7426, 7423, 7420, 7417, 7414, 7411, 7408, 7405, 7403, 7400, 
    7397, 7394, 7391, 7388, 7385, 7382, 7379, 7376, 7373, 7370, 7367, 7364, 7361, 7358, 7355, 7352, 
    7349, 7346, 7343, 7340, 7338, 7335, 7332, 7329, 7326, 7323, 7320, 7317, 7314, 7311, 7308, 7305, 
    7302, 7299, 7296, 7293, 7290, 7287, 7284, 7281, 7278, 7275, 7272, 7269, 7266, 7263, 7260, 7257, 
    7254, 7251, 7248, 7245, 7242, 7239, 7236, 7233, 7230, 7227, 7224, 7221, 7218, 7215, 7212, 7209, 
    7206, 7203, 7200, 7197, 7194, 7191, 7188, 7185, 7182, 7179, 7176, 7173, 7170, 7167, 7164, 7161, 
    7158, 7155, 7152, 7149, 7146, 7143, 7140, 7136, 7133, 7130, 7127, 7124, 7121, 7118, 7115, 7112, 
    7109, 7106, 7103, 7100, 7097, 7094, 7091, 7088, 7085, 7082, 7079, 7076, 7073, 7069, 7066, 7063, 
    7060, 7057, 7054, 7051, 7048, 7045, 7042, 7039, 7036, 7033, 7030, 7027, 7024, 7021, 7017, 7014, 
    7011, 7008, 7005, 7002, 6999, 6996, 6993, 6990, 6987, 6984, 6981, 6977, 6974, 6971, 6968, 6965, 
    6962, 6959, 6956, 6953, 6950, 6947, 6943, 6940, 6937, 6934, 6931, 6928, 6925, 6922, 6919, 6916, 
    6913, 6909, 6906, 6903, 6900, 6897, 6894, 6891, 6888, 6885, 6881, 6878, 6875, 6872, 6869, 6866, 
    6863, 6860, 6857, 6853, 6850, 6847, 6844, 6841, 6838, 6835, 6832, 6829, 6825, 6822, 6819, 6816, 
    6813, 6810, 6807, 6803, 6800, 6797, 6794, 6791, 6788, 6785, 6782, 6778, 6775, 6772, 6769, 6766, 
    6763, 6760, 6756, 6753, 6750, 6747, 6744, 6741, 6738, 6734, 6731, 6728, 6725, 6722, 6719, 6716, 
    6712, 6709, 6706, 6703, 6700, 6697, 6693, 6690, 6687, 6684, 6681, 6678, 6675, 6671, 6668, 6665, 
    6662, 6659, 6656, 6652, 6649, 6646, 6643, 6640, 6637, 6633, 6630, 6627, 6624, 6621, 6617, 6614, 
    6611, 6608, 6605, 6602, 6598, 6595, 6592, 6589, 6586, 6583, 6579, 6576, 6573, 6570, 6567, 6563, 
    6560, 6557, 6554, 6551, 6547, 6544, 6541, 6538, 6535, 6531, 6528, 6525, 6522, 6519, 6516, 6512, 
    6509, 6506, 6503, 6500, 6496, 6493, 6490, 6487, 6484, 6480, 6477, 6474, 6471, 6467, 6464, 6461, 
    6458, 6455, 6451, 6448, 6445, 6442, 6439, 6435, 6432, 6429, 6426, 6422, 6419, 6416, 6413, 6410, 
    6406, 6403, 6400, 6397, 6394, 6390, 6387, 6384, 6381, 6377, 6374, 6371, 6368, 6364, 6361, 6358, 
    6355, 6352, 6348, 6345, 6342, 6339, 6335, 6332, 6329, 6326, 6322, 6319, 6316, 6313, 6310, 6306, 
    6303, 6300, 6297, 6293, 6290, 6287, 6284, 6280, 6277, 6274, 6271, 6267, 6264, 6261, 6258, 6254, 
    6251, 6248, 6245, 6241, 6238, 6235, 6232, 6228, 6225, 6222, 6219, 6215, 6212, 6209, 6206, 6202, 
    6199, 6196, 6193, 6189, 6186, 6183, 6180, 6176, 6173, 6170, 6166, 6163, 6160, 6157, 6153, 6150, 
    6147, 6144, 6140, 6137, 6134, 6131, 6127, 6124, 6121, 6117, 6114, 6111, 6108, 6104, 6101, 6098, 
    6095, 6091, 6088, 6085, 6081, 6078, 6075, 6072, 6068, 6065, 6062, 6059, 6055, 6052, 6049, 6045, 
    6042, 6039, 6036, 6032, 6029, 6026, 6022, 6019, 6016, 6013, 6009, 6006, 6003, 5999, 5996, 5993, 
    5990, 5986, 5983, 5980, 5976, 5973, 5970, 5967, 5963, 5960, 5957, 5953, 5950, 5947, 5943, 5940, 
    5937, 5934, 5930, 5927, 5924, 5920, 5917, 5914, 5910, 5907, 5904, 5901, 5897, 5894, 5891, 5887, 
    5884, 5881, 5877, 5874, 5871, 5868, 5864, 5861, 5858, 5854, 5851, 5848, 5844, 5841, 5838, 5834, 
    5831, 5828, 5825, 5821, 5818, 5815, 5811, 5808, 5805, 5801, 5798, 5795, 5791, 5788, 5785, 5782, 
    5778, 5775, 5772, 5768, 5765, 5762, 5758, 5755, 5752, 5748, 5745, 5742, 5738, 5735, 5732, 5728, 
    5725, 5722, 5718, 5715, 5712, 5709, 5705, 5702, 5699, 5695, 5692, 5689, 5685, 5682, 5679, 5675, 
    5672, 5669, 5665, 5662, 5659, 5655, 5652, 5649, 5645, 5642, 5639, 5635, 5632, 5629, 5625, 5622, 
    5619, 5615, 5612, 5609, 5605, 5602, 5599, 5595, 5592, 5589, 5585, 5582, 5579, 5575, 5572, 5569, 
    5565, 5562, 5559, 5555, 5552, 5549, 5545, 5542, 5539, 5535, 5532, 5529, 5525, 5522, 5519, 5515, 
    5512, 5509, 5505, 5502, 5499, 5495, 5492, 5489, 5485, 5482, 5479, 5475, 5472, 5469, 5465, 5462, 
    5459, 5455, 5452, 5449, 5445, 5442, 5439, 5435, 5432, 5428, 5425, 5422, 5418, 5415, 5412, 5408, 
    5405, 5402, 5398, 5395, 5392, 5388, 5385, 5382, 5378, 5375, 5372, 5368, 5365, 5362, 5358, 5355, 
    5352, 5348, 5345, 5342, 5338, 5335, 5331, 5328, 5325, 5321, 5318, 5315, 5311, 5308, 5305, 5301, 
    5298, 5295, 5291, 5288, 5285, 5281, 5278, 5275, 5271, 5268, 5264, 5261, 5258, 5254, 5251, 5248, 
    5244, 5241, 5238, 5234, 5231, 5228, 5224, 5221, 5218, 5214, 5211, 5207, 5204, 5201, 5197, 5194, 
    5191, 5187, 5184, 5181, 5177, 5174, 5171, 5167, 5164, 5161, 5157, 5154, 5150, 5147, 5144, 5140, 
    5137, 5134, 5130, 5127, 5124, 5120, 5117, 5114, 5110, 5107, 5104, 5100, 5097, 5093, 5090, 5087, 
    5083, 5080, 5077, 5073, 5070, 5067, 5063, 5060, 5057, 5053, 5050, 5046, 5043, 5040, 5036, 5033, 
    5030, 5026, 5023, 5020, 5016, 5013, 5010, 5006, 5003, 5000, 4996, 4993, 4989, 4986, 4983, 4979, 
    4976, 4973, 4969, 4966, 4963, 4959, 4956, 4953, 4949, 4946, 4942, 4939, 4936, 4932, 4929, 4926, 
    4922, 4919, 4916, 4912, 4909, 4906, 4902, 4899, 4895, 4892, 4889, 4885, 4882, 4879, 4875, 4872, 
    4869, 4865, 4862, 4859, 4855, 4852, 4849, 4845, 4842, 4838, 4835, 4832, 4828, 4825, 4822, 4818, 
    4815, 4812, 4808, 4805, 4802, 4798, 4795, 4792, 4788, 4785, 4781, 4778, 4775, 4771, 4768, 4765, 
    4761, 4758, 4755, 4751, 4748, 4745, 4741, 4738, 4735, 4731, 4728, 4724, 4721, 4718, 4714, 4711, 
    4708, 4704, 4701, 4698, 4694, 4691, 4688, 4684, 4681, 4678, 4674, 4671, 4668, 4664, 4661, 4657, 
    4654, 4651, 4647, 4644, 4641, 4637, 4634, 4631, 4627, 4624, 4621, 4617, 4614, 4611, 4607, 4604, 
    4601, 4597, 4594, 4591, 4587, 4584, 4581, 4577, 4574, 4571, 4567, 4564, 4560, 4557, 4554, 4550, 
    4547, 4544, 4540, 4537, 4534, 4530, 4527, 4524, 4520, 4517, 4514, 4510, 4507, 4504, 4500, 4497, 
    4494, 4490, 4487, 4484, 4480, 4477, 4474, 4470, 4467, 4464, 4460, 4457, 4454, 4450, 4447, 4444, 
    4440, 4437, 4434, 4430, 4427, 4424, 4420, 4417, 4414, 4410, 4407, 4404, 4400, 4397, 4394, 4390, 
    4387, 4384, 4380, 4377, 4374, 4370, 4367, 4364, 4360, 4357, 4354, 4350, 4347, 4344, 4340, 4337, 
    4334, 4330, 4327, 4324, 4320, 4317, 4314, 4310, 4307, 4304, 4300, 4297, 4294, 4290, 4287, 4284, 
    4281, 4277, 4274, 4271, 4267, 4264, 4261, 4257, 4254, 4251, 4247, 4244, 4241, 4237, 4234, 4231, 
    4227, 4224, 4221, 4217, 4214, 4211, 4208, 4204, 4201, 4198, 4194, 4191, 4188, 4184, 4181, 4178, 
    4174, 4171, 4168, 4165, 4161, 4158, 4155, 4151, 4148, 4145, 4141, 4138, 4135, 4131, 4128, 4125, 
    4122, 4118, 4115, 4112, 4108, 4105, 4102, 4098, 4095, 4092, 4089, 4085, 4082, 4079, 4075, 4072, 
    4069, 4065, 4062, 4059, 4056, 4052, 4049, 4046, 4042, 4039, 4036, 4032, 4029, 4026, 4023, 4019, 
    4016, 4013, 4009, 4006, 4003, 4000, 3996, 3993, 3990, 3986, 3983, 3980, 3977, 3973, 3970, 3967, 
    3963, 3960, 3957, 3954, 3950, 3947, 3944, 3940, 3937, 3934, 3931, 3927, 3924, 3921, 3918, 3914, 
    3911, 3908, 3904, 3901, 3898, 3895, 3891, 3888, 3885, 3882, 3878, 3875, 3872, 3868, 3865, 3862, 
    3859, 3855, 3852, 3849, 3846, 3842, 3839, 3836, 3833, 3829, 3826, 3823, 3819, 3816, 3813, 3810, 
    3806, 3803, 3800, 3797, 3793, 3790, 3787, 3784, 3780, 3777, 3774, 3771, 3767, 3764, 3761, 3758, 
    3754, 3751, 3748, 3745, 3741, 3738, 3735, 3732, 3728, 3725, 3722, 3719, 3715, 3712, 3709, 3706, 
    3702, 3699, 3696, 3693, 3689, 3686, 3683, 3680, 3677, 3673, 3670, 3667, 3664, 3660, 3657, 3654, 
    3651, 3647, 3644, 3641, 3638, 3635, 3631, 3628, 3625, 3622, 3618, 3615, 3612, 3609, 3605, 3602, 
    3599, 3596, 3593, 3589, 3586, 3583, 3580, 3577, 3573, 3570, 3567, 3564, 3560, 3557, 3554, 3551, 
    3548, 3544, 3541, 3538, 3535, 3532, 3528, 3525, 3522, 3519, 3515, 3512, 3509, 3506, 3503, 3499, 
    3496, 3493, 3490, 3487, 3483, 3480, 3477, 3474, 3471, 3468, 3464, 3461, 3458, 3455, 3452, 3448, 
    3445, 3442, 3439, 3436, 3432, 3429, 3426, 3423, 3420, 3416, 3413, 3410, 3407, 3404, 3401, 3397, 
    3394, 3391, 3388, 3385, 3382, 3378, 3375, 3372, 3369, 3366, 3362, 3359, 3356, 3353, 3350, 3347, 
    3343, 3340, 3337, 3334, 3331, 3328, 3324, 3321, 3318, 3315, 3312, 3309, 3306, 3302, 3299, 3296, 
    3293, 3290, 3287, 3283, 3280, 3277, 3274, 3271, 3268, 3265, 3261, 3258, 3255, 3252, 3249, 3246, 
    3243, 3239, 3236, 3233, 3230, 3227, 3224, 3221, 3217, 3214, 3211, 3208, 3205, 3202, 3199, 3196, 
    3192, 3189, 3186, 3183, 3180, 3177, 3174, 3170, 3167, 3164, 3161, 3158, 3155, 3152, 3149, 3146, 
    3142, 3139, 3136, 3133, 3130, 3127, 3124, 3121, 3118, 3114, 3111, 3108, 3105, 3102, 3099, 3096, 
    3093, 3090, 3086, 3083, 3080, 3077, 3074, 3071, 3068, 3065, 3062, 3059, 3056, 3052, 3049, 3046, 
    3043, 3040, 3037, 3034, 3031, 3028, 3025, 3022, 3018, 3015, 3012, 3009, 3006, 3003, 3000, 2997, 
    2994, 2991, 2988, 2985, 2982, 2978, 2975, 2972, 2969, 2966, 2963, 2960, 2957, 2954, 2951, 2948, 
    2945, 2942, 2939, 2936, 2933, 2930, 2926, 2923, 2920, 2917, 2914, 2911, 2908, 2905, 2902, 2899, 
    2896, 2893, 2890, 2887, 2884, 2881, 2878, 2875, 2872, 2869, 2866, 2863, 2859, 2856, 2853, 2850, 
    2847, 2844, 2841, 2838, 2835, 2832, 2829, 2826, 2823, 2820, 2817, 2814, 2811, 2808, 2805, 2802, 
    2799, 2796, 2793, 2790, 2787, 2784, 2781, 2778, 2775, 2772, 2769, 2766, 2763, 2760, 2757, 2754, 
    2751, 2748, 2745, 2742, 2739, 2736, 2733, 2730, 2727, 2724, 2721, 2718, 2715, 2712, 2709, 2706, 
    2703, 2700, 2697, 2694, 2691, 2688, 2685, 2682, 2679, 2676, 2673, 2670, 2667, 2664, 2661, 2659, 
    2656, 2653, 2650, 2647, 2644, 2641, 2638, 2635, 2632, 2629, 2626, 2623, 2620, 2617, 2614, 2611, 
    2608, 2605, 2602, 2599, 2596, 2594, 2591, 2588, 2585, 2582, 2579, 2576, 2573, 2570, 2567, 2564, 
    2561, 2558, 2555, 2552, 2550, 2547, 2544, 2541, 2538, 2535, 2532, 2529, 2526, 2523, 2520, 2517, 
    2515, 2512, 2509, 2506, 2503, 2500, 2497, 2494, 2491, 2488, 2485, 2483, 2480, 2477, 2474, 2471, 
    2468, 2465, 2462, 2459, 2457, 2454, 2451, 2448, 2445, 2442, 2439, 2436, 2433, 2431, 2428, 2425, 
    2422, 2419, 2416, 2413, 2410, 2408, 2405, 2402, 2399, 2396, 2393, 2390, 2388, 2385, 2382, 2379, 
    2376, 2373, 2370, 2368, 2365, 2362, 2359, 2356, 2353, 2350, 2348, 2345, 2342, 2339, 2336, 2333, 
    2331, 2328, 2325, 2322, 2319, 2316, 2314, 2311, 2308, 2305, 2302, 2299, 2297, 2294, 2291, 2288, 
    2285, 2282, 2280, 2277, 2274, 2271, 2268, 2266, 2263, 2260, 2257, 2254, 2252, 2249, 2246, 2243, 
    2240, 2238, 2235, 2232, 2229, 2226, 2224, 2221, 2218, 2215, 2212, 2210, 2207, 2204, 2201, 2198, 
    2196, 2193, 2190, 2187, 2185, 2182, 2179, 2176, 2174, 2171, 2168, 2165, 2162, 2160, 2157, 2154, 
    2151, 2149, 2146, 2143, 2140, 2138, 2135, 2132, 2129, 2127, 2124, 2121, 2118, 2116, 2113, 2110, 
    2107, 2105, 2102, 2099, 2097, 2094, 2091, 2088, 2086, 2083, 2080, 2077, 2075, 2072, 2069, 2067, 
    2064, 2061, 2058, 2056, 2053, 2050, 2048, 2045, 2042, 2039, 2037, 2034, 2031, 2029, 2026, 2023, 
    2021, 2018, 2015, 2012, 2010, 2007, 2004, 2002, 1999, 1996, 1994, 1991, 1988, 1986, 1983, 1980, 
    1978, 1975, 1972, 1970, 1967, 1964, 1962, 1959, 1956, 1954, 1951, 1948, 1946, 1943, 1940, 1938, 
    1935, 1932, 1930, 1927, 1924, 1922, 1919, 1916, 1914, 1911, 1909, 1906, 1903, 1901, 1898, 1895, 
    1893, 1890, 1887, 1885, 1882, 1880, 1877, 1874, 1872, 1869, 1867, 1864, 1861, 1859, 1856, 1853, 
    1851, 1848, 1846, 1843, 1840, 1838, 1835, 1833, 1830, 1827, 1825, 1822, 1820, 1817, 1815, 1812, 
    1809, 1807, 1804, 1802, 1799, 1796, 1794, 1791, 1789, 1786, 1784, 1781, 1778, 1776, 1773, 1771, 
    1768, 1766, 1763, 1760, 1758, 1755, 1753, 1750, 1748, 1745, 1743, 1740, 1738, 1735, 1732, 1730, 
    1727, 1725, 1722, 1720, 1717, 1715, 1712, 1710, 1707, 1705, 1702, 1700, 1697, 1695, 1692, 1689, 
    1687, 1684, 1682, 1679, 1677, 1674, 1672, 1669, 1667, 1664, 1662, 1659, 1657, 1654, 1652, 1649, 
    1647, 1644, 1642, 1639, 1637, 1635, 1632, 1630, 1627, 1625, 1622, 1620, 1617, 1615, 1612, 1610, 
    1607, 1605, 1602, 1600, 1597, 1595, 1593, 1590, 1588, 1585, 1583, 1580, 1578, 1575, 1573, 1571, 
    1568, 1566, 1563, 1561, 1558, 1556, 1553, 1551, 1549, 1546, 1544, 1541, 1539, 1536, 1534, 1532, 
    1529, 1527, 1524, 1522, 1520, 1517, 1515, 1512, 1510, 1508, 1505, 1503, 1500, 1498, 1496, 1493, 
    1491, 1488, 1486, 1484, 1481, 1479, 1476, 1474, 1472, 1469, 1467, 1465, 1462, 1460, 1457, 1455, 
    1453, 1450, 1448, 1446, 1443, 1441, 1439, 1436, 1434, 1431, 1429, 1427, 1424, 1422, 1420, 1417, 
    1415, 1413, 1410, 1408, 1406, 1403, 1401, 1399, 1396, 1394, 1392, 1389, 1387, 1385, 1382, 1380, 
    1378, 1376, 1373, 1371, 1369, 1366, 1364, 1362, 1359, 1357, 1355, 1352, 1350, 1348, 1346, 1343, 
    1341, 1339, 1336, 1334, 1332, 1330, 1327, 1325, 1323, 1321, 1318, 1316, 1314, 1311, 1309, 1307, 
    1305, 1302, 1300, 1298, 1296, 1293, 1291, 1289, 1287, 1284, 1282, 1280, 1278, 1275, 1273, 1271, 
    1269, 1266, 1264, 1262, 1260, 1258, 1255, 1253, 1251, 1249, 1246, 1244, 1242, 1240, 1238, 1235, 
    1233, 1231, 1229, 1227, 1224, 1222, 1220, 1218, 1216, 1213, 1211, 1209, 1207, 1205, 1202, 1200, 
    1198, 1196, 1194, 1192, 1189, 1187, 1185, 1183, 1181, 1179, 1176, 1174, 1172, 1170, 1168, 1166, 
    1163, 1161, 1159, 1157, 1155, 1153, 1151, 1148, 1146, 1144, 1142, 1140, 1138, 1136, 1133, 1131, 
    1129, 1127, 1125, 1123, 1121, 1119, 1116, 1114, 1112, 1110, 1108, 1106, 1104, 1102, 1100, 1098, 
    1095, 1093, 1091, 1089, 1087, 1085, 1083, 1081, 1079, 1077, 1075, 1072, 1070, 1068, 1066, 1064, 
    1062, 1060, 1058, 1056, 1054, 1052, 1050, 1048, 1046, 1044, 1042, 1039, 1037, 1035, 1033, 1031, 
    1029, 1027, 1025, 1023, 1021, 1019, 1017, 1015, 1013, 1011, 1009, 1007, 1005, 1003, 1001,  999, 
     997,  995,  993,  991,  989,  987,  985,  983,  981,  979,  977,  975,  973,  971,  969,  967, 
     965,  963,  961,  959,  957,  955,  953,  951,  949,  947,  945,  943,  941,  939,  937,  935, 
     933,  931,  930,  928,  926,  924,  922,  920,  918,  916,  914,  912,  910,  908,  906,  904, 
     902,  900,  899,  897,  895,  893,  891,  889,  887,  885,  883,  881,  879,  878,  876,  874, 
     872,  870,  868,  866,  864,  862,  861,  859,  857,  855,  853,  851,  849,  847,  846,  844, 
     842,  840,  838,  836,  834,  833,  831,  829,  827,  825,  823,  821,  820,  818,  816,  814, 
     812,  810,  809,  807,  805,  803,  801,  799,  798,  796,  794,  792,  790,  789,  787,  785, 
     783,  781,  780,  778,  776,  774,  772,  771,  769,  767,  765,  763,  762,  760,  758,  756, 
     755,  753,  751,  749,  747,  746,  744,  742,  740,  739,  737,  735,  733,  732,  730,  728, 
     726,  725,  723,  721,  719,  718,  716,  714,  713,  711,  709,  707,  706,  704,  702,  700, 
     699,  697,  695,  694,  692,  690,  689,  687,  685,  683,  682,  680,  678,  677,  675,  673, 
     672,  670,  668,  667,  665,  663,  662,  660,  658,  657,  655,  653,  652,  650,  648,  647, 
     645,  643,  642,  640,  638,  637,  635,  633,  632,  630,  629,  627,  625,  624,  622,  620, 
     619,  617,  616,  614,  612,  611,  609,  608,  606,  604,  603,  601,  600,  598,  596,  595, 
     593,  592,  590,  588,  587,  585,  584,  582,  581,  579,  577,  576,  574,  573,  571,  570, 
     568,  567,  565,  563,  562,  560,  559,  557,  556,  554,  553,  551,  550,  548,  547,  545, 
     543,  542,  540,  539,  537,  536,  534,  533,  531,  530,  528,  527,  525,  524,  522,  521, 
     519,  518,  516,  515,  513,  512,  510,  509,  508,  506,  505,  503,  502,  500,  499,  497, 
     496,  494,  493,  491,  490,  489,  487,  486,  484,  483,  481,  480,  478,  477,  476,  474, 
     473,  471,  470,  468,  467,  466,  464,  463,  461,  460,  459,  457,  456,  454,  453,  452, 
     450,  449,  447,  446,  445,  443,  442,  441,  439,  438,  436,  435,  434,  432,  431,  430, 
     428,  427,  425,  424,  423,  421,  420,  419,  417,  416,  415,  413,  412,  411,  409,  408, 
     407,  405,  404,  403,  401,  400,  399,  397,  396,  395,  394,  392,  391,  390,  388,  387, 
     386,  384,  383,  382,  381,  379,  378,  377,  375,  374,  373,  372,  370,  369,  368,  367, 
     365,  364,  363,  362,  360,  359,  358,  357,  355,  354,  353,  352,  350,  349,  348,  347, 
     345,  344,  343,  342,  341,  339,  338,  337,  336,  334,  333,  332,  331,  330,  328,  327, 
     326,  325,  324,  322,  321,  320,  319,  318,  317,  315,  314,  313,  312,  311,  310,  308, 
     307,  306,  305,  304,  303,  301,  300,  299,  298,  297,  296,  295,  293,  292,  291,  290, 
     289,  288,  287,  286,  284,  283,  282,  281,  280,  279,  278,  277,  276,  275,  273,  272, 
     271,  270,  269,  268,  267,  266,  265,  264,  263,  262,  260,  259,  258,  257,  256,  255, 
     254,  253,  252,  251,  250,  249,  248,  247,  246,  245,  244,  243,  242,  240,  239,  238, 
     237,  236,  235,  234,  233,  232,  231,  230,  229,  228,  227,  226,  225,  224,  223,  222, 
     221,  220,  219,  218,  217,  216,  215,  214,  213,  213,  212,  211,  210,  209,  208,  207, 
     206,  205,  204,  203,  202,  201,  200,  199,  198,  197,  196,  195,  194,  194,  193,  192, 
     191,  190,  189,  188,  187,  186,  185,  184,  184,  183,  182,  181,  180,  179,  178,  177, 
     176,  175,  175,  174,  173,  172,  171,  170,  169,  168,  168,  167,  166,  165,  164,  163, 
     162,  162,  161,  160,  159,  158,  157,  157,  156,  155,  154,  153,  152,  152,  151,  150, 
     149,  148,  148,  147,  146,  145,  144,  144,  143,  142,  141,  140,  140,  139,  138,  137, 
     136,  136,  135,  134,  133,  133,  132,  131,  130,  129,  129,  128,  127,  126,  126,  125, 
     124,  123,  123,  122,  121,  121,  120,  119,  118,  118,  117,  116,  115,  115,  114,  113, 
     113,  112,  111,  110,  110,  109,  108,  108,  107,  106,  106,  105,  104,  104,  103,  102, 
     102,  101,  100,   99,   99,   98,   98,   97,   96,   96,   95,   94,   94,   93,   92,   92, 
      91,   90,   90,   89,   88,   88,   87,   87,   86,   85,   85,   84,   83,   83,   82,   82, 
      81,   80,   80,   79,   79,   78,   77,   77,   76,   76,   75,   75,   74,   73,   73,   72, 
      72,   71,   71,   70,   69,   69,   68,   68,   67,   67,   66,   66,   65,   64,   64,   63, 
      63,   62,   62,   61,   61,   60,   60,   59,   59,   58,   58,   57,   57,   56,   56,   55, 
      55,   54,   54,   53,   53,   52,   52,   51,   51,   50,   50,   49,   49,   48,   48,   47, 
      47,   47,   46,   46,   45,   45,   44,   44,   43,   43,   42,   42,   42,   41,   41,   40, 
      40,   39,   39,   39,   38,   38,   37,   37,   37,   36,   36,   35,   35,   35,   34,   34, 
      33,   33,   33,   32,   32,   31,   31,   31,   30,   30,   30,   29,   29,   28,   28,   28, 
      27,   27,   27,   26,   26,   26,   25,   25,   25,   24,   24,   24,   23,   23,   23,   22, 
      22,   22,   21,   21,   21,   20,   20,   20,   20,   19,   19,   19,   18,   18,   18,   18, 
      17,   17,   17,   16,   16,   16,   16,   15,   15,   15,   15,   14,   14,   14,   13,   13, 
      13,   13,   13,   12,   12,   12,   12,   11,   11,   11,   11,   10,   10,   10,   10,   10, 
       9,    9,    9,    9,    9,    8,    8,    8,    8,    8,    7,    7,    7,    7,    7,    6, 
       6,    6,    6,    6,    6,    5,    5,    5,    5,    5,    5,    4,    4,    4,    4,    4, 
       4,    4,    3,    3,    3,    3,    3,    3,    3,    3,    2,    2,    2,    2,    2,    2, 
       2,    2,    2,    2,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1, 
       0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0, 
       0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0, 
       0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0, 
       0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    1,    1,    1,    1, 
       1,    1,    1,    1,    1,    1,    1,    1,    2,    2,    2,    2,    2,    2,    2,    2, 
       2,    2,    3,    3,    3,    3,    3,    3,    3,    3,    4,    4,    4,    4,    4,    4, 
       4,    5,    5,    5,    5,    5,    5,    6,    6,    6,    6,    6,    6,    7,    7,    7, 
       7,    7,    8,    8,    8,    8,    8,    9,    9,    9,    9,    9,   10,   10,   10,   10, 
      10,   11,   11,   11,   11,   12,   12,   12,   12,   13,   13,   13,   13,   13,   14,   14, 
      14,   15,   15,   15,   15,   16,   16,   16,   16,   17,   17,   17,   18,   18,   18,   18, 
      19,   19,   19,   20,   20,   20,   20,   21,   21,   21,   22,   22,   22,   23,   23,   23, 
      24,   24,   24,   25,   25,   25,   26,   26,   26,   27,   27,   27,   28,   28,   28,   29, 
      29,   30,   30,   30,   31,   31,   31,   32,   32,   33,   33,   33,   34,   34,   35,   35, 
      35,   36,   36,   37,   37,   37,   38,   38,   39,   39,   39,   40,   40,   41,   41,   42, 
      42,   42,   43,   43,   44,   44,   45,   45,   46,   46,   47,   47,   47,   48,   48,   49, 
      49,   50,   50,   51,   51,   52,   52,   53,   53,   54,   54,   55,   55,   56,   56,   57, 
      57,   58,   58,   59,   59,   60,   60,   61,   61,   62,   62,   63,   63,   64,   64,   65, 
      66,   66,   67,   67,   68,   68,   69,   69,   70,   71,   71,   72,   72,   73,   73,   74, 
      75,   75,   76,   76,   77,   77,   78,   79,   79,   80,   80,   81,   82,   82,   83,   83, 
      84,   85,   85,   86,   87,   87,   88,   88,   89,   90,   90,   91,   92,   92,   93,   94, 
      94,   95,   96,   96,   97,   98,   98,   99,   99,  100,  101,  102,  102,  103,  104,  104, 
     105,  106,  106,  107,  108,  108,  109,  110,  110,  111,  112,  113,  113,  114,  115,  115, 
     116,  117,  118,  118,  119,  120,  121,  121,  122,  123,  123,  124,  125,  126,  126,  127, 
     128,  129,  129,  130,  131,  132,  133,  133,  134,  135,  136,  136,  137,  138,  139,  140, 
     140,  141,  142,  143,  144,  144,  145,  146,  147,  148,  148,  149,  150,  151,  152,  152, 
     153,  154,  155,  156,  157,  157,  158,  159,  160,  161,  162,  162,  163,  164,  165,  166, 
     167,  168,  168,  169,  170,  171,  172,  173,  174,  175,  175,  176,  177,  178,  179,  180, 
     181,  182,  183,  184,  184,  185,  186,  187,  188,  189,  190,  191,  192,  193,  194,  194, 
     195,  196,  197,  198,  199,  200,  201,  202,  203,  204,  205,  206,  207,  208,  209,  210, 
     211,  212,  213,  213,  214,  215,  216,  217,  218,  219,  220,  221,  222,  223,  224,  225, 
     226,  227,  228,  229,  230,  231,  232,  233,  234,  235,  236,  237,  238,  239,  240,  242, 
     243,  244,  245,  246,  247,  248,  249,  250,  251,  252,  253,  254,  255,  256,  257,  258, 
     259,  260,  262,  263,  264,  265,  266,  267,  268,  269,  270,  271,  272,  273,  275,  276, 
     277,  278,  279,  280,  281,  282,  283,  284,  286,  287,  288,  289,  290,  291,  292,  293, 
     295,  296,  297,  298,  299,  300,  301,  303,  304,  305,  306,  307,  308,  310,  311,  312, 
     313,  314,  315,  317,  318,  319,  320,  321,  322,  324,  325,  326,  327,  328,  330,  331, 
     332,  333,  334,  336,  337,  338,  339,  341,  342,  343,  344,  345,  347,  348,  349,  350, 
     352,  353,  354,  355,  357,  358,  359,  360,  362,  363,  364,  365,  367,  368,  369,  370, 
     372,  373,  374,  375,  377,  378,  379,  381,  382,  383,  384,  386,  387,  388,  390,  391, 
     392,  394,  395,  396,  397,  399,  400,  401,  403,  404,  405,  407,  408,  409,  411,  412, 
     413,  415,  416,  417,  419,  420,  421,  423,  424,  425,  427,  428,  430,  431,  432,  434, 
     435,  436,  438,  439,  441,  442,  443,  445,  446,  447,  449,  450,  452,  453,  454,  456, 
     457,  459,  460,  461,  463,  464,  466,  467,  468,  470,  471,  473,  474,  476,  477,  478, 
     480,  481,  483,  484,  486,  487,  489,  490,  491,  493,  494,  496,  497,  499,  500,  502, 
     503,  505,  506,  508,  509,  510,  512,  513,  515,  516,  518,  519,  521,  522,  524,  525, 
     527,  528,  530,  531,  533,  534,  536,  537,  539,  540,  542,  543,  545,  547,  548,  550, 
     551,  553,  554,  556,  557,  559,  560,  562,  563,  565,  567,  568,  570,  571,  573,  574, 
     576,  577,  579,  581,  582,  584,  585,  587,  588,  590,  592,  593,  595,  596,  598,  600, 
     601,  603,  604,  606,  608,  609,  611,  612,  614,  616,  617,  619,  620,  622,  624,  625, 
     627,  629,  630,  632,  633,  635,  637,  638,  640,  642,  643,  645,  647,  648,  650,  652, 
     653,  655,  657,  658,  660,  662,  663,  665,  667,  668,  670,  672,  673,  675,  677,  678, 
     680,  682,  683,  685,  687,  689,  690,  692,  694,  695,  697,  699,  700,  702,  704,  706, 
     707,  709,  711,  713,  714,  716,  718,  719,  721,  723,  725,  726,  728,  730,  732,  733, 
     735,  737,  739,  740,  742,  744,  746,  747,  749,  751,  753,  755,  756,  758,  760,  762, 
     763,  765,  767,  769,  771,  772,  774,  776,  778,  780,  781,  783,  785,  787,  789,  790, 
     792,  794,  796,  798,  799,  801,  803,  805,  807,  809,  810,  812,  814,  816,  818,  820, 
     821,  823,  825,  827,  829,  831,  833,  834,  836,  838,  840,  842,  844,  846,  847,  849, 
     851,  853,  855,  857,  859,  861,  862,  864,  866,  868,  870,  872,  874,  876,  878,  879, 
     881,  883,  885,  887,  889,  891,  893,  895,  897,  899,  900,  902,  904,  906,  908,  910, 
     912,  914,  916,  918,  920,  922,  924,  926,  928,  930,  931,  933,  935,  937,  939,  941, 
     943,  945,  947,  949,  951,  953,  955,  957,  959,  961,  963,  965,  967,  969,  971,  973, 
     975,  977,  979,  981,  983,  985,  987,  989,  991,  993,  995,  997,  999, 1001, 1003, 1005, 
    1007, 1009, 1011, 1013, 1015, 1017, 1019, 1021, 1023, 1025, 1027, 1029, 1031, 1033, 1035, 1037, 
    1039, 1042, 1044, 1046, 1048, 1050, 1052, 1054, 1056, 1058, 1060, 1062, 1064, 1066, 1068, 1070, 
    1072, 1075, 1077, 1079, 1081, 1083, 1085, 1087, 1089, 1091, 1093, 1095, 1098, 1100, 1102, 1104, 
    1106, 1108, 1110, 1112, 1114, 1116, 1119, 1121, 1123, 1125, 1127, 1129, 1131, 1133, 1136, 1138, 
    1140, 1142, 1144, 1146, 1148, 1151, 1153, 1155, 1157, 1159, 1161, 1163, 1166, 1168, 1170, 1172, 
    1174, 1176, 1179, 1181, 1183, 1185, 1187, 1189, 1192, 1194, 1196, 1198, 1200, 1202, 1205, 1207, 
    1209, 1211, 1213, 1216, 1218, 1220, 1222, 1224, 1227, 1229, 1231, 1233, 1235, 1238, 1240, 1242, 
    1244, 1246, 1249, 1251, 1253, 1255, 1258, 1260, 1262, 1264, 1266, 1269, 1271, 1273, 1275, 1278, 
    1280, 1282, 1284, 1287, 1289, 1291, 1293, 1296, 1298, 1300, 1302, 1305, 1307, 1309, 1311, 1314, 
    1316, 1318, 1321, 1323, 1325, 1327, 1330, 1332, 1334, 1336, 1339, 1341, 1343, 1346, 1348, 1350, 
    1352, 1355, 1357, 1359, 1362, 1364, 1366, 1369, 1371, 1373, 1376, 1378, 1380, 1382, 1385, 1387, 
    1389, 1392, 1394, 1396, 1399, 1401, 1403, 1406, 1408, 1410, 1413, 1415, 1417, 1420, 1422, 1424, 
    1427, 1429, 1431, 1434, 1436, 1439, 1441, 1443, 1446, 1448, 1450, 1453, 1455, 1457, 1460, 1462, 
    1465, 1467, 1469, 1472, 1474, 1476, 1479, 1481, 1484, 1486, 1488, 1491, 1493, 1496, 1498, 1500, 
    1503, 1505, 1508, 1510, 1512, 1515, 1517, 1520, 1522, 1524, 1527, 1529, 1532, 1534, 1536, 1539, 
    1541, 1544, 1546, 1549, 1551, 1553, 1556, 1558, 1561, 1563, 1566, 1568, 1571, 1573, 1575, 1578, 
    1580, 1583, 1585, 1588, 1590, 1593, 1595, 1597, 1600, 1602, 1605, 1607, 1610, 1612, 1615, 1617, 
    1620, 1622, 1625, 1627, 1630, 1632, 1635, 1637, 1639, 1642, 1644, 1647, 1649, 1652, 1654, 1657, 
    1659, 1662, 1664, 1667, 1669, 1672, 1674, 1677, 1679, 1682, 1684, 1687, 1689, 1692, 1695, 1697, 
    1700, 1702, 1705, 1707, 1710, 1712, 1715, 1717, 1720, 1722, 1725, 1727, 1730, 1732, 1735, 1738, 
    1740, 1743, 1745, 1748, 1750, 1753, 1755, 1758, 1760, 1763, 1766, 1768, 1771, 1773, 1776, 1778, 
    1781, 1784, 1786, 1789, 1791, 1794, 1796, 1799, 1802, 1804, 1807, 1809, 1812, 1815, 1817, 1820, 
    1822, 1825, 1827, 1830, 1833, 1835, 1838, 1840, 1843, 1846, 1848, 1851, 1853, 1856, 1859, 1861, 
    1864, 1867, 1869, 1872, 1874, 1877, 1880, 1882, 1885, 1887, 1890, 1893, 1895, 1898, 1901, 1903, 
    1906, 1909, 1911, 1914, 1916, 1919, 1922, 1924, 1927, 1930, 1932, 1935, 1938, 1940, 1943, 1946, 
    1948, 1951, 1954, 1956, 1959, 1962, 1964, 1967, 1970, 1972, 1975, 1978, 1980, 1983, 1986, 1988, 
    1991, 1994, 1996, 1999, 2002, 2004, 2007, 2010, 2012, 2015, 2018, 2021, 2023, 2026, 2029, 2031, 
    2034, 2037, 2039, 2042, 2045, 2048, 2050, 2053, 2056, 2058, 2061, 2064, 2067, 2069, 2072, 2075, 
    2077, 2080, 2083, 2086, 2088, 2091, 2094, 2097, 2099, 2102, 2105, 2107, 2110, 2113, 2116, 2118, 
    2121, 2124, 2127, 2129, 2132, 2135, 2138, 2140, 2143, 2146, 2149, 2151, 2154, 2157, 2160, 2162, 
    2165, 2168, 2171, 2174, 2176, 2179, 2182, 2185, 2187, 2190, 2193, 2196, 2198, 2201, 2204, 2207, 
    2210, 2212, 2215, 2218, 2221, 2224, 2226, 2229, 2232, 2235, 2238, 2240, 2243, 2246, 2249, 2252, 
    2254, 2257, 2260, 2263, 2266, 2268, 2271, 2274, 2277, 2280, 2282, 2285, 2288, 2291, 2294, 2297, 
    2299, 2302, 2305, 2308, 2311, 2314, 2316, 2319, 2322, 2325, 2328, 2331, 2333, 2336, 2339, 2342, 
    2345, 2348, 2350, 2353, 2356, 2359, 2362, 2365, 2368, 2370, 2373, 2376, 2379, 2382, 2385, 2388, 
    2390, 2393, 2396, 2399, 2402, 2405, 2408, 2410, 2413, 2416, 2419, 2422, 2425, 2428, 2431, 2433, 
    2436, 2439, 2442, 2445, 2448, 2451, 2454, 2457, 2459, 2462, 2465, 2468, 2471, 2474, 2477, 2480, 
    2483, 2485, 2488, 2491, 2494, 2497, 2500, 2503, 2506, 2509, 2512, 2515, 2517, 2520, 2523, 2526, 
    2529, 2532, 2535, 2538, 2541, 2544, 2547, 2550, 2552, 2555, 2558, 2561, 2564, 2567, 2570, 2573, 
    2576, 2579, 2582, 2585, 2588, 2591, 2594, 2596, 2599, 2602, 2605, 2608, 2611, 2614, 2617, 2620, 
    2623, 2626, 2629, 2632, 2635, 2638, 2641, 2644, 2647, 2650, 2653, 2656, 2659, 2661, 2664, 2667, 
    2670, 2673, 2676, 2679, 2682, 2685, 2688, 2691, 2694, 2697, 2700, 2703, 2706, 2709, 2712, 2715, 
    2718, 2721, 2724, 2727, 2730, 2733, 2736, 2739, 2742, 2745, 2748, 2751, 2754, 2757, 2760, 2763, 
    2766, 2769, 2772, 2775, 2778, 2781, 2784, 2787, 2790, 2793, 2796, 2799, 2802, 2805, 2808, 2811, 
    2814, 2817, 2820, 2823, 2826, 2829, 2832, 2835, 2838, 2841, 2844, 2847, 2850, 2853, 2856, 2859, 
    2863, 2866, 2869, 2872, 2875, 2878, 2881, 2884, 2887, 2890, 2893, 2896, 2899, 2902, 2905, 2908, 
    2911, 2914, 2917, 2920, 2923, 2926, 2930, 2933, 2936, 2939, 2942, 2945, 2948, 2951, 2954, 2957, 
    2960, 2963, 2966, 2969, 2972, 2975, 2978, 2982, 2985, 2988, 2991, 2994, 2997, 3000, 3003, 3006, 
    3009, 3012, 3015, 3018, 3022, 3025, 3028, 3031, 3034, 3037, 3040, 3043, 3046, 3049, 3052, 3056, 
    3059, 3062, 3065, 3068, 3071, 3074, 3077, 3080, 3083, 3086, 3090, 3093, 3096, 3099, 3102, 3105, 
    3108, 3111, 3114, 3118, 3121, 3124, 3127, 3130, 3133, 3136, 3139, 3142, 3146, 3149, 3152, 3155, 
    3158, 3161, 3164, 3167, 3170, 3174, 3177, 3180, 3183, 3186, 3189, 3192, 3196, 3199, 3202, 3205, 
    3208, 3211, 3214, 3217, 3221, 3224, 3227, 3230, 3233, 3236, 3239, 3243, 3246, 3249, 3252, 3255, 
    3258, 3261, 3265, 3268, 3271, 3274, 3277, 3280, 3283, 3287, 3290, 3293, 3296, 3299, 3302, 3306, 
    3309, 3312, 3315, 3318, 3321, 3324, 3328, 3331, 3334, 3337, 3340, 3343, 3347, 3350, 3353, 3356, 
    3359, 3362, 3366, 3369, 3372, 3375, 3378, 3382, 3385, 3388, 3391, 3394, 3397, 3401, 3404, 3407, 
    3410, 3413, 3416, 3420, 3423, 3426, 3429, 3432, 3436, 3439, 3442, 3445, 3448, 3452, 3455, 3458, 
    3461, 3464, 3468, 3471, 3474, 3477, 3480, 3483, 3487, 3490, 3493, 3496, 3499, 3503, 3506, 3509, 
    3512, 3515, 3519, 3522, 3525, 3528, 3532, 3535, 3538, 3541, 3544, 3548, 3551, 3554, 3557, 3560, 
    3564, 3567, 3570, 3573, 3577, 3580, 3583, 3586, 3589, 3593, 3596, 3599, 3602, 3605, 3609, 3612, 
    3615, 3618, 3622, 3625, 3628, 3631, 3635, 3638, 3641, 3644, 3647, 3651, 3654, 3657, 3660, 3664, 
    3667, 3670, 3673, 3677, 3680, 3683, 3686, 3689, 3693, 3696, 3699, 3702, 3706, 3709, 3712, 3715, 
    3719, 3722, 3725, 3728, 3732, 3735, 3738, 3741, 3745, 3748, 3751, 3754, 3758, 3761, 3764, 3767, 
    3771, 3774, 3777, 3780, 3784, 3787, 3790, 3793, 3797, 3800, 3803, 3806, 3810, 3813, 3816, 3819, 
    3823, 3826, 3829, 3833, 3836, 3839, 3842, 3846, 3849, 3852, 3855, 3859, 3862, 3865, 3868, 3872, 
    3875, 3878, 3882, 3885, 3888, 3891, 3895, 3898, 3901, 3904, 3908, 3911, 3914, 3918, 3921, 3924, 
    3927, 3931, 3934, 3937, 3940, 3944, 3947, 3950, 3954, 3957, 3960, 3963, 3967, 3970, 3973, 3977, 
    3980, 3983, 3986, 3990, 3993, 3996, 4000, 4003, 4006, 4009, 4013, 4016, 4019, 4023, 4026, 4029, 
    4032, 4036, 4039, 4042, 4046, 4049, 4052, 4056, 4059, 4062, 4065, 4069, 4072, 4075, 4079, 4082, 
    4085, 4089, 4092, 4095, 4098, 4102, 4105, 4108, 4112, 4115, 4118, 4122, 4125, 4128, 4131, 4135, 
    4138, 4141, 4145, 4148, 4151, 4155, 4158, 4161, 4165, 4168, 4171, 4174, 4178, 4181, 4184, 4188, 
    4191, 4194, 4198, 4201, 4204, 4208, 4211, 4214, 4217, 4221, 4224, 4227, 4231, 4234, 4237, 4241, 
    4244, 4247, 4251, 4254, 4257, 4261, 4264, 4267, 4271, 4274, 4277, 4281, 4284, 4287, 4290, 4294, 
    4297, 4300, 4304, 4307, 4310, 4314, 4317, 4320, 4324, 4327, 4330, 4334, 4337, 4340, 4344, 4347, 
    4350, 4354, 4357, 4360, 4364, 4367, 4370, 4374, 4377, 4380, 4384, 4387, 4390, 4394, 4397, 4400, 
    4404, 4407, 4410, 4414, 4417, 4420, 4424, 4427, 4430, 4434, 4437, 4440, 4444, 4447, 4450, 4454, 
    4457, 4460, 4464, 4467, 4470, 4474, 4477, 4480, 4484, 4487, 4490, 4494, 4497, 4500, 4504, 4507, 
    4510, 4514, 4517, 4520, 4524, 4527, 4530, 4534, 4537, 4540, 4544, 4547, 4550, 4554, 4557, 4560, 
    4564, 4567, 4571, 4574, 4577, 4581, 4584, 4587, 4591, 4594, 4597, 4601, 4604, 4607, 4611, 4614, 
    4617, 4621, 4624, 4627, 4631, 4634, 4637, 4641, 4644, 4647, 4651, 4654, 4657, 4661, 4664, 4668, 
    4671, 4674, 4678, 4681, 4684, 4688, 4691, 4694, 4698, 4701, 4704, 4708, 4711, 4714, 4718, 4721, 
    4724, 4728, 4731, 4735, 4738, 4741, 4745, 4748, 4751, 4755, 4758, 4761, 4765, 4768, 4771, 4775, 
    4778, 4781, 4785, 4788, 4792, 4795, 4798, 4802, 4805, 4808, 4812, 4815, 4818, 4822, 4825, 4828, 
    4832, 4835, 4838, 4842, 4845, 4849, 4852, 4855, 4859, 4862, 4865, 4869, 4872, 4875, 4879, 4882, 
    4885, 4889, 4892, 4895, 4899, 4902, 4906, 4909, 4912, 4916, 4919, 4922, 4926, 4929, 4932, 4936, 
    4939, 4942, 4946, 4949, 4953, 4956, 4959, 4963, 4966, 4969, 4973, 4976, 4979, 4983, 4986, 4989, 
    4993, 4996, 
};

#else

const uint16 foc_output_array[FAST_FOC_ARRAY_LENGTH] = {
    5000,5007,5014,5021,5028,5035,5042,5049,5056,5064,5071,5078,5085,5092,5099,5106,
    5113,5121,5128,5135,5142,5149,5156,5163,5170,5177,5185,5192,5199,5206,5213,5220,
    5227,5234,5241,5249,5256,5263,5270,5277,5284,5291,5298,5305,5312,5320,5327,5334,
    5341,5348,5355,5362,5369,5376,5383,5391,5398,5405,5412,5419,5426,5433,5440,5447,
    5454,5461,5469,5476,5483,5490,5497,5504,5511,5518,5525,5532,5539,5546,5553,5561,
    5568,5575,5582,5589,5596,5603,5610,5617,5624,5631,5638,5645,5652,5659,5666,5673,
    5681,5688,5695,5702,5709,5716,5723,5730,5737,5744,5751,5758,5765,5772,5779,5786,
    5793,5800,5807,5814,5821,5828,5835,5842,5849,5856,5863,5870,5877,5884,5891,5898,
    5905,5912,5919,5926,5933,5940,5947,5954,5961,5968,5975,5982,5989,5996,6003,6010,
    6017,6024,6031,6037,6044,6051,6058,6065,6072,6079,6086,6093,6100,6107,6114,6121,
    6128,6134,6141,6148,6155,6162,6169,6176,6183,6190,6197,6203,6210,6217,6224,6231,
    6238,6245,6252,6258,6265,6272,6279,6286,6293,6300,6306,6313,6320,6327,6334,6341,
    6347,6354,6361,6368,6375,6382,6388,6395,6402,6409,6416,6422,6429,6436,6443,6450,
    6456,6463,6470,6477,6483,6490,6497,6504,6510,6517,6524,6531,6537,6544,6551,6558,
    6564,6571,6578,6584,6591,6598,6605,6611,6618,6625,6631,6638,6645,6651,6658,6665,
    6671,6678,6685,6691,6698,6705,6711,6718,6725,6731,6738,6744,6751,6758,6764,6771,
    6778,6784,6791,6797,6804,6811,6817,6824,6830,6837,6843,6850,6856,6863,6870,6876,
    6883,6889,6896,6902,6909,6915,6922,6928,6935,6941,6948,6954,6961,6967,6974,6980,
    6987,6993,7000,7006,7013,7019,7026,7032,7038,7045,7051,7058,7064,7071,7077,7083,
    7090,7096,7103,7109,7115,7122,7128,7134,7141,7147,7153,7160,7166,7173,7179,7185,
    7191,7198,7204,7210,7217,7223,7229,7236,7242,7248,7254,7261,7267,7273,7280,7286,
    7292,7298,7305,7311,7317,7323,7329,7336,7342,7348,7354,7360,7367,7373,7379,7385,
    7391,7397,7404,7410,7416,7422,7428,7434,7440,7447,7453,7459,7465,7471,7477,7483,
    7489,7495,7501,7507,7513,7520,7526,7532,7538,7544,7550,7556,7562,7568,7574,7580,
    7586,7592,7598,7604,7610,7616,7622,7628,7633,7639,7645,7651,7657,7663,7669,7675,
    7681,7687,7693,7699,7704,7710,7716,7722,7728,7734,7740,7745,7751,7757,7763,7769,
    7774,7780,7786,7792,7798,7803,7809,7815,7821,7826,7832,7838,7844,7849,7855,7861,
    7867,7872,7878,7884,7889,7895,7901,7906,7912,7918,7923,7929,7935,7940,7946,7951,
    7957,7963,7968,7974,7979,7985,7991,7996,8002,8007,8013,8018,8024,8029,8035,8040,
    8046,8051,8057,8062,8068,8073,8079,8084,8090,8095,8101,8106,8112,8117,8122,8128,
    8133,8139,8144,8149,8155,8160,8165,8171,8176,8181,8187,8192,8197,8203,8208,8213,
    8219,8224,8229,8235,8240,8245,8250,8256,8261,8266,8271,8276,8282,8287,8292,8297,
    8302,8308,8313,8318,8323,8328,8333,8339,8344,8349,8354,8359,8364,8369,8374,8379,
    8384,8390,8395,8400,8405,8410,8415,8420,8425,8430,8435,8440,8445,8450,8455,8460,
    8465,8470,8475,8479,8484,8489,8494,8499,8504,8509,8514,8519,8524,8528,8533,8538,
    8543,8548,8553,8557,8562,8567,8572,8577,8581,8586,8591,8596,8601,8605,8610,8615,
    8619,8624,8629,8634,8638,8643,8648,8652,8657,8662,8666,8671,8676,8680,8685,8689,
    8694,8699,8703,8708,8712,8717,8721,8726,8731,8735,8740,8744,8749,8753,8758,8762,
    8767,8771,8776,8780,8784,8789,8793,8798,8802,8807,8811,8815,8820,8824,8828,8833,
    8837,8842,8846,8850,8855,8859,8863,8867,8872,8876,8880,8885,8889,8893,8897,8902,
    8906,8910,8914,8918,8923,8927,8931,8935,8939,8944,8948,8952,8956,8960,8964,8968,
    8972,8977,8981,8985,8989,8993,8997,9001,9005,9009,9013,9017,9021,9025,9029,9033,
    9037,9041,9045,9049,9053,9057,9061,9065,9069,9072,9076,9080,9084,9088,9092,9096,
    9100,9103,9107,9111,9115,9119,9122,9126,9130,9134,9138,9141,9145,9149,9153,9156,
    9160,9164,9167,9171,9175,9178,9182,9186,9189,9193,9197,9200,9204,9208,9211,9215,
    9218,9222,9226,9229,9233,9236,9240,9243,9247,9250,9254,9257,9261,9264,9268,9271,
    9275,9278,9282,9285,9288,9292,9295,9299,9302,9305,9309,9312,9315,9319,9322,9325,
    9329,9332,9335,9339,9342,9345,9349,9352,9355,9358,9362,9365,9368,9371,9374,9378,
    9381,9384,9387,9390,9393,9397,9400,9403,9406,9409,9412,9415,9418,9421,9425,9428,
    9431,9434,9437,9440,9443,9446,9449,9452,9455,9458,9461,9464,9467,9470,9473,9475,
    9478,9481,9484,9487,9490,9493,9496,9499,9501,9504,9507,9510,9513,9516,9518,9521,
    9524,9527,9530,9532,9535,9538,9541,9543,9546,9549,9551,9554,9557,9559,9562,9565,
    9567,9570,9573,9575,9578,9581,9583,9586,9588,9591,9593,9596,9599,9601,9604,9606,
    9609,9611,9614,9616,9619,9621,9624,9626,9629,9631,9633,9636,9638,9641,9643,9645,
    9648,9650,9653,9655,9657,9660,9662,9664,9667,9669,9671,9674,9676,9678,9680,9683,
    9685,9687,9689,9692,9694,9696,9698,9700,9703,9705,9707,9709,9711,9713,9715,9718,
    9720,9722,9724,9726,9728,9730,9732,9734,9736,9738,9740,9742,9744,9746,9748,9750,
    9752,9754,9756,9758,9760,9762,9764,9766,9768,9770,9772,9774,9776,9778,9779,9781,
    9783,9785,9787,9789,9790,9792,9794,9796,9798,9799,9801,9803,9805,9806,9808,9810,
    9812,9813,9815,9817,9818,9820,9822,9823,9825,9827,9828,9830,9832,9833,9835,9836,
    9838,9840,9841,9843,9844,9846,9847,9849,9850,9852,9853,9855,9856,9858,9859,9861,
    9862,9864,9865,9867,9868,9869,9871,9872,9874,9875,9876,9878,9879,9881,9882,9883,
    9885,9886,9887,9889,9890,9891,9892,9894,9895,9896,9897,9899,9900,9901,9902,9904,
    9905,9906,9907,9908,9909,9911,9912,9913,9914,9915,9916,9917,9919,9920,9921,9922,
    9923,9924,9925,9926,9927,9928,9929,9930,9931,9932,9933,9934,9935,9936,9937,9938,
    9939,9940,9941,9942,9943,9944,9945,9946,9946,9947,9948,9949,9950,9951,9952,9952,
    9953,9954,9955,9956,9957,9957,9958,9959,9960,9960,9961,9962,9963,9963,9964,9965,
    9966,9966,9967,9968,9968,9969,9970,9970,9971,9972,9972,9973,9973,9974,9975,9975,
    9976,9976,9977,9978,9978,9979,9979,9980,9980,9981,9981,9982,9982,9983,9983,9984,
    9984,9985,9985,9986,9986,9986,9987,9987,9988,9988,9989,9989,9989,9990,9990,9990,
    9991,9991,9991,9992,9992,9992,9993,9993,9993,9994,9994,9994,9994,9995,9995,9995,
    9995,9996,9996,9996,9996,9997,9997,9997,9997,9997,9997,9998,9998,9998,9998,9998,
    9998,9998,9999,9999,9999,9999,9999,9999,9999,9999,9999,9999,9999,9999,9999,9999,
    9999,9999,10000,9999,9999,9999,9999,9999,9999,9999,9999,9999,9999,9999,9999,9999,
    9999,9999,9999,9999,9998,9998,9998,9998,9998,9998,9998,9997,9997,9997,9997,9997,
    9997,9996,9996,9996,9996,9995,9995,9995,9995,9995,9994,9994,9994,9993,9993,9993,
    9993,9992,9992,9992,9991,9991,9991,9990,9990,9990,9989,9989,9989,9988,9988,9987,
    9987,9987,9986,9986,9985,9985,9984,9984,9984,9983,9983,9982,9982,9981,9981,9980,
    9980,9979,9979,9978,9978,9977,9977,9976,9976,9975,9975,9974,9973,9973,9972,9972,
    9971,9971,9970,9969,9969,9968,9967,9967,9966,9966,9965,9964,9964,9963,9962,9962,
    9961,9960,9960,9959,9958,9957,9957,9956,9955,9955,9954,9953,9952,9952,9951,9950,
    9949,9949,9948,9947,9946,9945,9945,9944,9943,9942,9941,9940,9940,9939,9938,9937,
    9936,9935,9935,9934,9933,9932,9931,9930,9929,9928,9927,9927,9926,9925,9924,9923,
    9922,9921,9920,9919,9918,9917,9916,9915,9914,9913,9912,9911,9910,9909,9908,9907,
    9906,9905,9904,9903,9902,9901,9900,9899,9898,9897,9896,9895,9894,9893,9891,9890,
    9889,9888,9887,9886,9885,9884,9883,9881,9880,9879,9878,9877,9876,9875,9873,9872,
    9871,9870,9869,9868,9866,9865,9864,9863,9862,9860,9859,9858,9857,9856,9854,9853,
    9852,9851,9849,9848,9847,9846,9844,9843,9842,9840,9839,9838,9837,9835,9834,9833,
    9831,9830,9829,9827,9826,9825,9823,9822,9821,9819,9818,9817,9815,9814,9813,9811,
    9810,9809,9807,9806,9804,9803,9802,9800,9799,9797,9796,9795,9793,9792,9790,9789,
    9788,9786,9785,9783,9782,9780,9779,9777,9776,9774,9773,9772,9770,9769,9767,9766,
    9764,9763,9761,9760,9758,9757,9755,9754,9752,9751,9749,9748,9746,9744,9743,9741,
    9740,9738,9737,9735,9734,9732,9731,9729,9727,9726,9724,9723,9721,9720,9718,9716,
    9715,9713,9712,9710,9708,9707,9705,9704,9702,9700,9699,9697,9695,9694,9692,9690,
    9689,9687,9686,9684,9682,9681,9679,9677,9676,9674,9672,9671,9669,9667,9666,9664,
    9662,9661,9659,9657,9655,9654,9652,9650,9649,9647,9645,9644,9642,9640,9638,9637,
    9635,9633,9631,9630,9628,9626,9625,9623,9621,9619,9618,9616,9614,9612,9611,9609,
    9607,9605,9604,9602,9600,9598,9596,9595,9593,9591,9589,9588,9586,9584,9582,9580,
    9579,9577,9575,9573,9571,9570,9568,9566,9564,9562,9561,9559,9557,9555,9553,9551,
    9550,9548,9546,9544,9542,9540,9539,9537,9535,9533,9531,9529,9528,9526,9524,9522,
    9520,9518,9517,9515,9513,9511,9509,9507,9505,9503,9502,9500,9498,9496,9494,9492,
    9490,9489,9487,9485,9483,9481,9479,9477,9475,9473,9472,9470,9468,9466,9464,9462,
    9460,9458,9456,9455,9453,9451,9449,9447,9445,9443,9441,9439,9437,9436,9434,9432,
    9430,9428,9426,9424,9422,9420,9418,9416,9415,9413,9411,9409,9407,9405,9403,9401,
    9399,9397,9395,9393,9392,9390,9388,9386,9384,9382,9380,9378,9376,9374,9372,9370,
    9368,9366,9365,9363,9361,9359,9357,9355,9353,9351,9349,9347,9345,9343,9341,9339,
    9337,9336,9334,9332,9330,9328,9326,9324,9322,9320,9318,9316,9314,9312,9310,9308,
    9306,9305,9303,9301,9299,9297,9295,9293,9291,9289,9287,9285,9283,9281,9279,9277,
    9276,9274,9272,9270,9268,9266,9264,9262,9260,9258,9256,9254,9252,9250,9248,9246,
    9245,9243,9241,9239,9237,9235,9233,9231,9229,9227,9225,9223,9221,9219,9218,9216,
    9214,9212,9210,9208,9206,9204,9202,9200,9198,9196,9195,9193,9191,9189,9187,9185,
    9183,9181,9179,9177,9175,9173,9172,9170,9168,9166,9164,9162,9160,9158,9156,9154,
    9153,9151,9149,9147,9145,9143,9141,9139,9137,9135,9134,9132,9130,9128,9126,9124,
    9122,9120,9119,9117,9115,9113,9111,9109,9107,9105,9104,9102,9100,9098,9096,9094,
    9092,9091,9089,9087,9085,9083,9081,9079,9078,9076,9074,9072,9070,9068,9066,9065,
    9063,9061,9059,9057,9055,9054,9052,9050,9048,9046,9045,9043,9041,9039,9037,9035,
    9034,9032,9030,9028,9026,9025,9023,9021,9019,9017,9016,9014,9012,9010,9008,9007,
    9005,9003,9001,9000,8998,8996,8994,8992,8991,8989,8987,8985,8984,8982,8980,8978,
    8977,8975,8973,8971,8970,8968,8966,8964,8963,8961,8959,8958,8956,8954,8952,8951,
    8949,8947,8946,8944,8942,8940,8939,8937,8935,8934,8932,8930,8929,8927,8925,8924,
    8922,8920,8919,8917,8915,8914,8912,8910,8909,8907,8905,8904,8902,8900,8899,8897,
    8895,8894,8892,8890,8889,8887,8886,8884,8882,8881,8879,8878,8876,8874,8873,8871,
    8870,8868,8866,8865,8863,8862,8860,8859,8857,8855,8854,8852,8851,8849,8848,8846,
    8844,8843,8841,8840,8838,8837,8835,8834,8832,8831,8829,8828,8826,8825,8823,8822,
    8820,8819,8817,8816,8814,8813,8811,8810,8808,8807,8805,8804,8802,8801,8799,8798,
    8797,8795,8794,8792,8791,8789,8788,8787,8785,8784,8782,8781,8779,8778,8777,8775,
    8774,8772,8771,8770,8768,8767,8766,8764,8763,8761,8760,8759,8757,8756,8755,8753,
    8752,8751,8749,8748,8747,8745,8744,8743,8741,8740,8739,8737,8736,8735,8734,8732,
    8731,8730,8728,8727,8726,8725,8723,8722,8721,8720,8718,8717,8716,8715,8713,8712,
    8711,8710,8708,8707,8706,8705,8704,8702,8701,8700,8699,8698,8697,8695,8694,8693,
    8692,8691,8689,8688,8687,8686,8685,8684,8683,8682,8680,8679,8678,8677,8676,8675,
    8674,8673,8672,8670,8669,8668,8667,8666,8665,8664,8663,8662,8661,8660,8659,8658,
    8657,8656,8655,8654,8652,8651,8650,8649,8648,8647,8646,8645,8644,8643,8642,8642,
    8641,8640,8639,8638,8637,8636,8635,8634,8633,8632,8631,8630,8629,8628,8627,8626,
    8626,8625,8624,8623,8622,8621,8620,8619,8618,8618,8617,8616,8615,8614,8613,8612,
    8612,8611,8610,8609,8608,8608,8607,8606,8605,8604,8603,8603,8602,8601,8600,8600,
    8599,8598,8597,8597,8596,8595,8594,8594,8593,8592,8591,8591,8590,8589,8589,8588,
    8587,8586,8586,8585,8584,8584,8583,8582,8582,8581,8580,8580,8579,8578,8578,8577,
    8577,8576,8575,8575,8574,8574,8573,8572,8572,8571,8571,8570,8569,8569,8568,8568,
    8567,8567,8566,8566,8565,8565,8564,8564,8563,8562,8562,8561,8561,8560,8560,8560,
    8559,8559,8558,8558,8557,8557,8556,8556,8555,8555,8555,8554,8554,8553,8553,8552,
    8552,8552,8551,8551,8550,8550,8550,8549,8549,8549,8548,8548,8548,8547,8547,8547,
    8546,8546,8546,8545,8545,8545,8544,8544,8544,8543,8543,8543,8543,8542,8542,8542,
    8542,8541,8541,8541,8541,8540,8540,8540,8540,8540,8539,8539,8539,8539,8539,8538,
    8538,8538,8538,8538,8538,8537,8537,8537,8537,8537,8537,8537,8536,8536,8536,8536,
    8536,8536,8536,8536,8536,8536,8536,8535,8535,8535,8535,8535,8535,8535,8535,8535,
    8535,8535,8535,8535,8535,8535,8535,8535,8535,8535,8535,8535,8535,8535,8535,8535,
    8535,8535,8535,8536,8536,8536,8536,8536,8536,8536,8536,8536,8536,8536,8537,8537,
    8537,8537,8537,8537,8537,8538,8538,8538,8538,8538,8538,8539,8539,8539,8539,8539,
    8540,8540,8540,8540,8540,8541,8541,8541,8541,8542,8542,8542,8542,8543,8543,8543,
    8543,8544,8544,8544,8545,8545,8545,8546,8546,8546,8547,8547,8547,8548,8548,8548,
    8549,8549,8549,8550,8550,8550,8551,8551,8552,8552,8552,8553,8553,8554,8554,8555,
    8555,8555,8556,8556,8557,8557,8558,8558,8559,8559,8560,8560,8560,8561,8561,8562,
    8562,8563,8564,8564,8565,8565,8566,8566,8567,8567,8568,8568,8569,8569,8570,8571,
    8571,8572,8572,8573,8574,8574,8575,8575,8576,8577,8577,8578,8578,8579,8580,8580,
    8581,8582,8582,8583,8584,8584,8585,8586,8586,8587,8588,8589,8589,8590,8591,8591,
    8592,8593,8594,8594,8595,8596,8597,8597,8598,8599,8600,8600,8601,8602,8603,8603,
    8604,8605,8606,8607,8608,8608,8609,8610,8611,8612,8612,8613,8614,8615,8616,8617,
    8618,8618,8619,8620,8621,8622,8623,8624,8625,8626,8626,8627,8628,8629,8630,8631,
    8632,8633,8634,8635,8636,8637,8638,8639,8640,8641,8642,8642,8643,8644,8645,8646,
    8647,8648,8649,8650,8651,8652,8654,8655,8656,8657,8658,8659,8660,8661,8662,8663,
    8664,8665,8666,8667,8668,8669,8670,8672,8673,8674,8675,8676,8677,8678,8679,8680,
    8682,8683,8684,8685,8686,8687,8688,8689,8691,8692,8693,8694,8695,8697,8698,8699,
    8700,8701,8702,8704,8705,8706,8707,8708,8710,8711,8712,8713,8715,8716,8717,8718,
    8720,8721,8722,8723,8725,8726,8727,8728,8730,8731,8732,8734,8735,8736,8737,8739,
    8740,8741,8743,8744,8745,8747,8748,8749,8751,8752,8753,8755,8756,8757,8759,8760,
    8761,8763,8764,8766,8767,8768,8770,8771,8772,8774,8775,8777,8778,8779,8781,8782,
    8784,8785,8787,8788,8789,8791,8792,8794,8795,8797,8798,8799,8801,8802,8804,8805,
    8807,8808,8810,8811,8813,8814,8816,8817,8819,8820,8822,8823,8825,8826,8828,8829,
    8831,8832,8834,8835,8837,8838,8840,8841,8843,8844,8846,8848,8849,8851,8852,8854,
    8855,8857,8859,8860,8862,8863,8865,8866,8868,8870,8871,8873,8874,8876,8878,8879,
    8881,8882,8884,8886,8887,8889,8890,8892,8894,8895,8897,8899,8900,8902,8904,8905,
    8907,8909,8910,8912,8914,8915,8917,8919,8920,8922,8924,8925,8927,8929,8930,8932,
    8934,8935,8937,8939,8940,8942,8944,8946,8947,8949,8951,8952,8954,8956,8958,8959,
    8961,8963,8964,8966,8968,8970,8971,8973,8975,8977,8978,8980,8982,8984,8985,8987,
    8989,8991,8992,8994,8996,8998,9000,9001,9003,9005,9007,9008,9010,9012,9014,9016,
    9017,9019,9021,9023,9025,9026,9028,9030,9032,9034,9035,9037,9039,9041,9043,9045,
    9046,9048,9050,9052,9054,9055,9057,9059,9061,9063,9065,9066,9068,9070,9072,9074,
    9076,9078,9079,9081,9083,9085,9087,9089,9091,9092,9094,9096,9098,9100,9102,9104,
    9105,9107,9109,9111,9113,9115,9117,9119,9120,9122,9124,9126,9128,9130,9132,9134,
    9135,9137,9139,9141,9143,9145,9147,9149,9151,9153,9154,9156,9158,9160,9162,9164,
    9166,9168,9170,9172,9173,9175,9177,9179,9181,9183,9185,9187,9189,9191,9193,9195,
    9196,9198,9200,9202,9204,9206,9208,9210,9212,9214,9216,9218,9219,9221,9223,9225,
    9227,9229,9231,9233,9235,9237,9239,9241,9243,9245,9246,9248,9250,9252,9254,9256,
    9258,9260,9262,9264,9266,9268,9270,9272,9274,9276,9277,9279,9281,9283,9285,9287,
    9289,9291,9293,9295,9297,9299,9301,9303,9305,9306,9308,9310,9312,9314,9316,9318,
    9320,9322,9324,9326,9328,9330,9332,9334,9336,9337,9339,9341,9343,9345,9347,9349,
    9351,9353,9355,9357,9359,9361,9363,9365,9366,9368,9370,9372,9374,9376,9378,9380,
    9382,9384,9386,9388,9390,9392,9393,9395,9397,9399,9401,9403,9405,9407,9409,9411,
    9413,9415,9416,9418,9420,9422,9424,9426,9428,9430,9432,9434,9436,9437,9439,9441,
    9443,9445,9447,9449,9451,9453,9455,9456,9458,9460,9462,9464,9466,9468,9470,9472,
    9473,9475,9477,9479,9481,9483,9485,9487,9489,9490,9492,9494,9496,9498,9500,9502,
    9503,9505,9507,9509,9511,9513,9515,9517,9518,9520,9522,9524,9526,9528,9529,9531,
    9533,9535,9537,9539,9540,9542,9544,9546,9548,9550,9551,9553,9555,9557,9559,9561,
    9562,9564,9566,9568,9570,9571,9573,9575,9577,9579,9580,9582,9584,9586,9588,9589,
    9591,9593,9595,9596,9598,9600,9602,9604,9605,9607,9609,9611,9612,9614,9616,9618,
    9619,9621,9623,9625,9626,9628,9630,9631,9633,9635,9637,9638,9640,9642,9644,9645,
    9647,9649,9650,9652,9654,9655,9657,9659,9661,9662,9664,9666,9667,9669,9671,9672,
    9674,9676,9677,9679,9681,9682,9684,9686,9687,9689,9690,9692,9694,9695,9697,9699,
    9700,9702,9704,9705,9707,9708,9710,9712,9713,9715,9716,9718,9720,9721,9723,9724,
    9726,9727,9729,9731,9732,9734,9735,9737,9738,9740,9741,9743,9744,9746,9748,9749,
    9751,9752,9754,9755,9757,9758,9760,9761,9763,9764,9766,9767,9769,9770,9772,9773,
    9774,9776,9777,9779,9780,9782,9783,9785,9786,9788,9789,9790,9792,9793,9795,9796,
    9797,9799,9800,9802,9803,9804,9806,9807,9809,9810,9811,9813,9814,9815,9817,9818,
    9819,9821,9822,9823,9825,9826,9827,9829,9830,9831,9833,9834,9835,9837,9838,9839,
    9840,9842,9843,9844,9846,9847,9848,9849,9851,9852,9853,9854,9856,9857,9858,9859,
    9860,9862,9863,9864,9865,9866,9868,9869,9870,9871,9872,9873,9875,9876,9877,9878,
    9879,9880,9881,9883,9884,9885,9886,9887,9888,9889,9890,9891,9893,9894,9895,9896,
    9897,9898,9899,9900,9901,9902,9903,9904,9905,9906,9907,9908,9909,9910,9911,9912,
    9913,9914,9915,9916,9917,9918,9919,9920,9921,9922,9923,9924,9925,9926,9927,9927,
    9928,9929,9930,9931,9932,9933,9934,9935,9935,9936,9937,9938,9939,9940,9940,9941,
    9942,9943,9944,9945,9945,9946,9947,9948,9949,9949,9950,9951,9952,9952,9953,9954,
    9955,9955,9956,9957,9957,9958,9959,9960,9960,9961,9962,9962,9963,9964,9964,9965,
    9966,9966,9967,9967,9968,9969,9969,9970,9971,9971,9972,9972,9973,9973,9974,9975,
    9975,9976,9976,9977,9977,9978,9978,9979,9979,9980,9980,9981,9981,9982,9982,9983,
    9983,9984,9984,9984,9985,9985,9986,9986,9987,9987,9987,9988,9988,9989,9989,9989,
    9990,9990,9990,9991,9991,9991,9992,9992,9992,9993,9993,9993,9993,9994,9994,9994,
    9995,9995,9995,9995,9995,9996,9996,9996,9996,9997,9997,9997,9997,9997,9997,9998,
    9998,9998,9998,9998,9998,9998,9999,9999,9999,9999,9999,9999,9999,9999,9999,9999,
    9999,9999,9999,9999,9999,9999,9999,10000,9999,9999,9999,9999,9999,9999,9999,9999,
    9999,9999,9999,9999,9999,9999,9999,9999,9998,9998,9998,9998,9998,9998,9998,9997,
    9997,9997,9997,9997,9997,9996,9996,9996,9996,9995,9995,9995,9995,9994,9994,9994,
    9994,9993,9993,9993,9992,9992,9992,9991,9991,9991,9990,9990,9990,9989,9989,9989,
    9988,9988,9987,9987,9986,9986,9986,9985,9985,9984,9984,9983,9983,9982,9982,9981,
    9981,9980,9980,9979,9979,9978,9978,9977,9976,9976,9975,9975,9974,9973,9973,9972,
    9972,9971,9970,9970,9969,9968,9968,9967,9966,9966,9965,9964,9963,9963,9962,9961,
    9960,9960,9959,9958,9957,9957,9956,9955,9954,9953,9952,9952,9951,9950,9949,9948,
    9947,9946,9946,9945,9944,9943,9942,9941,9940,9939,9938,9937,9936,9935,9934,9933,
    9932,9931,9930,9929,9928,9927,9926,9925,9924,9923,9922,9921,9920,9919,9917,9916,
    9915,9914,9913,9912,9911,9909,9908,9907,9906,9905,9904,9902,9901,9900,9899,9897,
    9896,9895,9894,9892,9891,9890,9889,9887,9886,9885,9883,9882,9881,9879,9878,9876,
    9875,9874,9872,9871,9869,9868,9867,9865,9864,9862,9861,9859,9858,9856,9855,9853,
    9852,9850,9849,9847,9846,9844,9843,9841,9840,9838,9836,9835,9833,9832,9830,9828,
    9827,9825,9823,9822,9820,9818,9817,9815,9813,9812,9810,9808,9806,9805,9803,9801,
    9799,9798,9796,9794,9792,9790,9789,9787,9785,9783,9781,9779,9778,9776,9774,9772,
    9770,9768,9766,9764,9762,9760,9758,9756,9754,9752,9750,9748,9746,9744,9742,9740,
    9738,9736,9734,9732,9730,9728,9726,9724,9722,9720,9718,9715,9713,9711,9709,9707,
    9705,9703,9700,9698,9696,9694,9692,9689,9687,9685,9683,9680,9678,9676,9674,9671,
    9669,9667,9664,9662,9660,9657,9655,9653,9650,9648,9645,9643,9641,9638,9636,9633,
    9631,9629,9626,9624,9621,9619,9616,9614,9611,9609,9606,9604,9601,9599,9596,9593,
    9591,9588,9586,9583,9581,9578,9575,9573,9570,9567,9565,9562,9559,9557,9554,9551,
    9549,9546,9543,9541,9538,9535,9532,9530,9527,9524,9521,9518,9516,9513,9510,9507,
    9504,9501,9499,9496,9493,9490,9487,9484,9481,9478,9475,9473,9470,9467,9464,9461,
    9458,9455,9452,9449,9446,9443,9440,9437,9434,9431,9428,9425,9421,9418,9415,9412,
    9409,9406,9403,9400,9397,9393,9390,9387,9384,9381,9378,9374,9371,9368,9365,9362,
    9358,9355,9352,9349,9345,9342,9339,9335,9332,9329,9325,9322,9319,9315,9312,9309,
    9305,9302,9299,9295,9292,9288,9285,9282,9278,9275,9271,9268,9264,9261,9257,9254,
    9250,9247,9243,9240,9236,9233,9229,9226,9222,9218,9215,9211,9208,9204,9200,9197,
    9193,9189,9186,9182,9178,9175,9171,9167,9164,9160,9156,9153,9149,9145,9141,9138,
    9134,9130,9126,9122,9119,9115,9111,9107,9103,9100,9096,9092,9088,9084,9080,9076,
    9072,9069,9065,9061,9057,9053,9049,9045,9041,9037,9033,9029,9025,9021,9017,9013,
    9009,9005,9001,8997,8993,8989,8985,8981,8977,8972,8968,8964,8960,8956,8952,8948,
    8944,8939,8935,8931,8927,8923,8918,8914,8910,8906,8902,8897,8893,8889,8885,8880,
    8876,8872,8867,8863,8859,8855,8850,8846,8842,8837,8833,8828,8824,8820,8815,8811,
    8807,8802,8798,8793,8789,8784,8780,8776,8771,8767,8762,8758,8753,8749,8744,8740,
    8735,8731,8726,8721,8717,8712,8708,8703,8699,8694,8689,8685,8680,8676,8671,8666,
    8662,8657,8652,8648,8643,8638,8634,8629,8624,8619,8615,8610,8605,8601,8596,8591,
    8586,8581,8577,8572,8567,8562,8557,8553,8548,8543,8538,8533,8528,8524,8519,8514,
    8509,8504,8499,8494,8489,8484,8479,8475,8470,8465,8460,8455,8450,8445,8440,8435,
    8430,8425,8420,8415,8410,8405,8400,8395,8390,8384,8379,8374,8369,8364,8359,8354,
    8349,8344,8339,8333,8328,8323,8318,8313,8308,8302,8297,8292,8287,8282,8276,8271,
    8266,8261,8256,8250,8245,8240,8235,8229,8224,8219,8213,8208,8203,8197,8192,8187,
    8181,8176,8171,8165,8160,8155,8149,8144,8139,8133,8128,8122,8117,8112,8106,8101,
    8095,8090,8084,8079,8073,8068,8062,8057,8051,8046,8040,8035,8029,8024,8018,8013,
    8007,8002,7996,7991,7985,7979,7974,7968,7963,7957,7951,7946,7940,7935,7929,7923,
    7918,7912,7906,7901,7895,7889,7884,7878,7872,7867,7861,7855,7849,7844,7838,7832,
    7826,7821,7815,7809,7803,7798,7792,7786,7780,7774,7769,7763,7757,7751,7745,7740,
    7734,7728,7722,7716,7710,7704,7699,7693,7687,7681,7675,7669,7663,7657,7651,7645,
    7639,7633,7628,7622,7616,7610,7604,7598,7592,7586,7580,7574,7568,7562,7556,7550,
    7544,7538,7532,7526,7520,7513,7507,7501,7495,7489,7483,7477,7471,7465,7459,7453,
    7447,7440,7434,7428,7422,7416,7410,7404,7397,7391,7385,7379,7373,7367,7360,7354,
    7348,7342,7336,7329,7323,7317,7311,7305,7298,7292,7286,7280,7273,7267,7261,7254,
    7248,7242,7236,7229,7223,7217,7210,7204,7198,7191,7185,7179,7173,7166,7160,7153,
    7147,7141,7134,7128,7122,7115,7109,7103,7096,7090,7083,7077,7071,7064,7058,7051,
    7045,7038,7032,7026,7019,7013,7006,7000,6993,6987,6980,6974,6967,6961,6954,6948,
    6941,6935,6928,6922,6915,6909,6902,6896,6889,6883,6876,6870,6863,6857,6850,6843,
    6837,6830,6824,6817,6811,6804,6797,6791,6784,6778,6771,6764,6758,6751,6744,6738,
    6731,6725,6718,6711,6705,6698,6691,6685,6678,6671,6665,6658,6651,6645,6638,6631,
    6625,6618,6611,6605,6598,6591,6584,6578,6571,6564,6558,6551,6544,6537,6531,6524,
    6517,6510,6504,6497,6490,6483,6477,6470,6463,6456,6450,6443,6436,6429,6422,6416,
    6409,6402,6395,6388,6382,6375,6368,6361,6354,6347,6341,6334,6327,6320,6313,6306,
    6300,6293,6286,6279,6272,6265,6258,6252,6245,6238,6231,6224,6217,6210,6203,6197,
    6190,6183,6176,6169,6162,6155,6148,6141,6134,6128,6121,6114,6107,6100,6093,6086,
    6079,6072,6065,6058,6051,6044,6037,6031,6024,6017,6010,6003,5996,5989,5982,5975,
    5968,5961,5954,5947,5940,5933,5926,5919,5912,5905,5898,5891,5884,5877,5870,5863,
    5856,5849,5842,5835,5828,5821,5814,5807,5800,5793,5786,5779,5772,5765,5758,5751,
    5744,5737,5730,5723,5716,5709,5702,5695,5688,5681,5673,5666,5659,5652,5645,5638,
    5631,5624,5617,5610,5603,5596,5589,5582,5575,5568,5561,5553,5546,5539,5532,5525,
    5518,5511,5504,5497,5490,5483,5476,5469,5461,5454,5447,5440,5433,5426,5419,5412,
    5405,5398,5391,5383,5376,5369,5362,5355,5348,5341,5334,5327,5320,5312,5305,5298,
    5291,5284,5277,5270,5263,5256,5249,5241,5234,5227,5220,5213,5206,5199,5192,5185,
    5177,5170,5163,5156,5149,5142,5135,5128,5121,5113,5106,5099,5092,5085,5078,5071,
    5064,5056,5049,5042,5035,5028,5021,5014,5007,5000,4992,4985,4978,4971,4964,4957,
    4950,4943,4935,4928,4921,4914,4907,4900,4893,4886,4878,4871,4864,4857,4850,4843,
    4836,4829,4822,4814,4807,4800,4793,4786,4779,4772,4765,4758,4750,4743,4736,4729,
    4722,4715,4708,4701,4694,4687,4679,4672,4665,4658,4651,4644,4637,4630,4623,4616,
    4608,4601,4594,4587,4580,4573,4566,4559,4552,4545,4538,4530,4523,4516,4509,4502,
    4495,4488,4481,4474,4467,4460,4453,4446,4438,4431,4424,4417,4410,4403,4396,4389,
    4382,4375,4368,4361,4354,4347,4340,4333,4326,4318,4311,4304,4297,4290,4283,4276,
    4269,4262,4255,4248,4241,4234,4227,4220,4213,4206,4199,4192,4185,4178,4171,4164,
    4157,4150,4143,4136,4129,4122,4115,4108,4101,4094,4087,4080,4073,4066,4059,4052,
    4045,4038,4031,4024,4017,4010,4003,3996,3989,3982,3975,3968,3962,3955,3948,3941,
    3934,3927,3920,3913,3906,3899,3892,3885,3878,3871,3865,3858,3851,3844,3837,3830,
    3823,3816,3809,3802,3796,3789,3782,3775,3768,3761,3754,3747,3741,3734,3727,3720,
    3713,3706,3699,3693,3686,3679,3672,3665,3658,3652,3645,3638,3631,3624,3617,3611,
    3604,3597,3590,3583,3577,3570,3563,3556,3549,3543,3536,3529,3522,3516,3509,3502,
    3495,3489,3482,3475,3468,3462,3455,3448,3441,3435,3428,3421,3415,3408,3401,3394,
    3388,3381,3374,3368,3361,3354,3348,3341,3334,3328,3321,3314,3308,3301,3294,3288,
    3281,3274,3268,3261,3255,3248,3241,3235,3228,3221,3215,3208,3202,3195,3188,3182,
    3175,3169,3162,3156,3149,3143,3136,3129,3123,3116,3110,3103,3097,3090,3084,3077,
    3071,3064,3058,3051,3045,3038,3032,3025,3019,3012,3006,2999,2993,2986,2980,2973,
    2967,2961,2954,2948,2941,2935,2928,2922,2916,2909,2903,2896,2890,2884,2877,2871,
    2865,2858,2852,2846,2839,2833,2826,2820,2814,2808,2801,2795,2789,2782,2776,2770,
    2763,2757,2751,2745,2738,2732,2726,2719,2713,2707,2701,2694,2688,2682,2676,2670,
    2663,2657,2651,2645,2639,2632,2626,2620,2614,2608,2602,2595,2589,2583,2577,2571,
    2565,2559,2552,2546,2540,2534,2528,2522,2516,2510,2504,2498,2492,2486,2479,2473,
    2467,2461,2455,2449,2443,2437,2431,2425,2419,2413,2407,2401,2395,2389,2383,2377,
    2371,2366,2360,2354,2348,2342,2336,2330,2324,2318,2312,2306,2300,2295,2289,2283,
    2277,2271,2265,2259,2254,2248,2242,2236,2230,2225,2219,2213,2207,2201,2196,2190,
    2184,2178,2173,2167,2161,2155,2150,2144,2138,2132,2127,2121,2115,2110,2104,2098,
    2093,2087,2081,2076,2070,2064,2059,2053,2048,2042,2036,2031,2025,2020,2014,2008,
    2003,1997,1992,1986,1981,1975,1970,1964,1959,1953,1948,1942,1937,1931,1926,1920,
    1915,1909,1904,1898,1893,1887,1882,1877,1871,1866,1860,1855,1850,1844,1839,1834,
    1828,1823,1818,1812,1807,1802,1796,1791,1786,1780,1775,1770,1764,1759,1754,1749,
    1743,1738,1733,1728,1723,1717,1712,1707,1702,1697,1691,1686,1681,1676,1671,1666,
    1660,1655,1650,1645,1640,1635,1630,1625,1620,1615,1609,1604,1599,1594,1589,1584,
    1579,1574,1569,1564,1559,1554,1549,1544,1539,1534,1529,1524,1520,1515,1510,1505,
    1500,1495,1490,1485,1480,1475,1471,1466,1461,1456,1451,1446,1442,1437,1432,1427,
    1422,1418,1413,1408,1403,1398,1394,1389,1384,1380,1375,1370,1365,1361,1356,1351,
    1347,1342,1337,1333,1328,1323,1319,1314,1310,1305,1300,1296,1291,1287,1282,1278,
    1273,1268,1264,1259,1255,1250,1246,1241,1237,1232,1228,1223,1219,1215,1210,1206,
    1201,1197,1192,1188,1184,1179,1175,1171,1166,1162,1157,1153,1149,1144,1140,1136,
    1132,1127,1123,1119,1114,1110,1106,1102,1097,1093,1089,1085,1081,1076,1072,1068,
    1064,1060,1055,1051,1047,1043,1039,1035,1031,1027,1022,1018,1014,1010,1006,1002,
     998, 994, 990, 986, 982, 978, 974, 970, 966, 962, 958, 954, 950, 946, 942, 938,
     934, 930, 927, 923, 919, 915, 911, 907, 903, 899, 896, 892, 888, 884, 880, 877,
     873, 869, 865, 861, 858, 854, 850, 846, 843, 839, 835, 832, 828, 824, 821, 817,
     813, 810, 806, 802, 799, 795, 791, 788, 784, 781, 777, 773, 770, 766, 763, 759,
     756, 752, 749, 745, 742, 738, 735, 731, 728, 724, 721, 717, 714, 711, 707, 704,
     700, 697, 694, 690, 687, 684, 680, 677, 674, 670, 667, 664, 660, 657, 654, 650,
     647, 644, 641, 637, 634, 631, 628, 625, 621, 618, 615, 612, 609, 606, 602, 599,
     596, 593, 590, 587, 584, 581, 578, 574, 571, 568, 565, 562, 559, 556, 553, 550,
     547, 544, 541, 538, 535, 532, 529, 526, 524, 521, 518, 515, 512, 509, 506, 503,
     500, 498, 495, 492, 489, 486, 483, 481, 478, 475, 472, 469, 467, 464, 461, 458,
     456, 453, 450, 448, 445, 442, 440, 437, 434, 432, 429, 426, 424, 421, 418, 416,
     413, 411, 408, 406, 403, 400, 398, 395, 393, 390, 388, 385, 383, 380, 378, 375,
     373, 370, 368, 366, 363, 361, 358, 356, 354, 351, 349, 346, 344, 342, 339, 337,
     335, 332, 330, 328, 325, 323, 321, 319, 316, 314, 312, 310, 307, 305, 303, 301,
     299, 296, 294, 292, 290, 288, 286, 284, 281, 279, 277, 275, 273, 271, 269, 267,
     265, 263, 261, 259, 257, 255, 253, 251, 249, 247, 245, 243, 241, 239, 237, 235,
     233, 231, 229, 227, 225, 223, 221, 220, 218, 216, 214, 212, 210, 209, 207, 205,
     203, 201, 200, 198, 196, 194, 193, 191, 189, 187, 186, 184, 182, 181, 179, 177,
     176, 174, 172, 171, 169, 167, 166, 164, 163, 161, 159, 158, 156, 155, 153, 152,
     150, 149, 147, 146, 144, 143, 141, 140, 138, 137, 135, 134, 132, 131, 130, 128,
     127, 125, 124, 123, 121, 120, 118, 117, 116, 114, 113, 112, 110, 109, 108, 107,
     105, 104, 103, 102, 100,  99,  98,  97,  95,  94,  93,  92,  91,  90,  88,  87,
      86,  85,  84,  83,  82,  80,  79,  78,  77,  76,  75,  74,  73,  72,  71,  70,
      69,  68,  67,  66,  65,  64,  63,  62,  61,  60,  59,  58,  57,  56,  55,  54,
      53,  53,  52,  51,  50,  49,  48,  47,  47,  46,  45,  44,  43,  42,  42,  41,
      40,  39,  39,  38,  37,  36,  36,  35,  34,  33,  33,  32,  31,  31,  30,  29,
      29,  28,  27,  27,  26,  26,  25,  24,  24,  23,  23,  22,  21,  21,  20,  20,
      19,  19,  18,  18,  17,  17,  16,  16,  15,  15,  14,  14,  13,  13,  13,  12,
      12,  11,  11,  10,  10,  10,   9,   9,   9,   8,   8,   8,   7,   7,   7,   6,
       6,   6,   5,   5,   5,   5,   4,   4,   4,   4,   3,   3,   3,   3,   2,   2,
       2,   2,   2,   2,   1,   1,   1,   1,   1,   1,   1,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   1,   1,   1,
       1,   1,   1,   1,   2,   2,   2,   2,   2,   2,   3,   3,   3,   3,   4,   4,
       4,   4,   4,   5,   5,   5,   6,   6,   6,   6,   7,   7,   7,   8,   8,   8,
       9,   9,   9,  10,  10,  10,  11,  11,  12,  12,  12,  13,  13,  14,  14,  15,
      15,  15,  16,  16,  17,  17,  18,  18,  19,  19,  20,  20,  21,  21,  22,  22,
      23,  23,  24,  24,  25,  26,  26,  27,  27,  28,  28,  29,  30,  30,  31,  32,
      32,  33,  33,  34,  35,  35,  36,  37,  37,  38,  39,  39,  40,  41,  42,  42,
      43,  44,  44,  45,  46,  47,  47,  48,  49,  50,  50,  51,  52,  53,  54,  54,
      55,  56,  57,  58,  59,  59,  60,  61,  62,  63,  64,  64,  65,  66,  67,  68,
      69,  70,  71,  72,  72,  73,  74,  75,  76,  77,  78,  79,  80,  81,  82,  83,
      84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95,  96,  97,  98,  99,
     100, 101, 102, 103, 104, 105, 106, 108, 109, 110, 111, 112, 113, 114, 115, 116,
     118, 119, 120, 121, 122, 123, 124, 126, 127, 128, 129, 130, 131, 133, 134, 135,
     136, 137, 139, 140, 141, 142, 143, 145, 146, 147, 148, 150, 151, 152, 153, 155,
     156, 157, 159, 160, 161, 162, 164, 165, 166, 168, 169, 170, 172, 173, 174, 176,
     177, 178, 180, 181, 182, 184, 185, 186, 188, 189, 190, 192, 193, 195, 196, 197,
     199, 200, 202, 203, 204, 206, 207, 209, 210, 211, 213, 214, 216, 217, 219, 220,
     222, 223, 225, 226, 227, 229, 230, 232, 233, 235, 236, 238, 239, 241, 242, 244,
     245, 247, 248, 250, 251, 253, 255, 256, 258, 259, 261, 262, 264, 265, 267, 268,
     270, 272, 273, 275, 276, 278, 279, 281, 283, 284, 286, 287, 289, 291, 292, 294,
     295, 297, 299, 300, 302, 304, 305, 307, 309, 310, 312, 313, 315, 317, 318, 320,
     322, 323, 325, 327, 328, 330, 332, 333, 335, 337, 338, 340, 342, 344, 345, 347,
     349, 350, 352, 354, 355, 357, 359, 361, 362, 364, 366, 368, 369, 371, 373, 374,
     376, 378, 380, 381, 383, 385, 387, 388, 390, 392, 394, 395, 397, 399, 401, 403,
     404, 406, 408, 410, 411, 413, 415, 417, 419, 420, 422, 424, 426, 428, 429, 431,
     433, 435, 437, 438, 440, 442, 444, 446, 448, 449, 451, 453, 455, 457, 459, 460,
     462, 464, 466, 468, 470, 471, 473, 475, 477, 479, 481, 482, 484, 486, 488, 490,
     492, 494, 496, 497, 499, 501, 503, 505, 507, 509, 510, 512, 514, 516, 518, 520,
     522, 524, 525, 527, 529, 531, 533, 535, 537, 539, 541, 543, 544, 546, 548, 550,
     552, 554, 556, 558, 560, 562, 563, 565, 567, 569, 571, 573, 575, 577, 579, 581,
     583, 584, 586, 588, 590, 592, 594, 596, 598, 600, 602, 604, 606, 607, 609, 611,
     613, 615, 617, 619, 621, 623, 625, 627, 629, 631, 633, 634, 636, 638, 640, 642,
     644, 646, 648, 650, 652, 654, 656, 658, 660, 662, 663, 665, 667, 669, 671, 673,
     675, 677, 679, 681, 683, 685, 687, 689, 691, 693, 694, 696, 698, 700, 702, 704,
     706, 708, 710, 712, 714, 716, 718, 720, 722, 723, 725, 727, 729, 731, 733, 735,
     737, 739, 741, 743, 745, 747, 749, 751, 753, 754, 756, 758, 760, 762, 764, 766,
     768, 770, 772, 774, 776, 778, 780, 781, 783, 785, 787, 789, 791, 793, 795, 797,
     799, 801, 803, 804, 806, 808, 810, 812, 814, 816, 818, 820, 822, 824, 826, 827,
     829, 831, 833, 835, 837, 839, 841, 843, 845, 846, 848, 850, 852, 854, 856, 858,
     860, 862, 864, 865, 867, 869, 871, 873, 875, 877, 879, 880, 882, 884, 886, 888,
     890, 892, 894, 895, 897, 899, 901, 903, 905, 907, 908, 910, 912, 914, 916, 918,
     920, 921, 923, 925, 927, 929, 931, 933, 934, 936, 938, 940, 942, 944, 945, 947,
     949, 951, 953, 954, 956, 958, 960, 962, 964, 965, 967, 969, 971, 973, 974, 976,
     978, 980, 982, 983, 985, 987, 989, 991, 992, 994, 996, 998, 999,1001,1003,1005,
    1007,1008,1010,1012,1014,1015,1017,1019,1021,1022,1024,1026,1028,1029,1031,1033,
    1035,1036,1038,1040,1041,1043,1045,1047,1048,1050,1052,1053,1055,1057,1059,1060,
    1062,1064,1065,1067,1069,1070,1072,1074,1075,1077,1079,1080,1082,1084,1085,1087,
    1089,1090,1092,1094,1095,1097,1099,1100,1102,1104,1105,1107,1109,1110,1112,1113,
    1115,1117,1118,1120,1121,1123,1125,1126,1128,1129,1131,1133,1134,1136,1137,1139,
    1140,1142,1144,1145,1147,1148,1150,1151,1153,1155,1156,1158,1159,1161,1162,1164,
    1165,1167,1168,1170,1171,1173,1174,1176,1177,1179,1180,1182,1183,1185,1186,1188,
    1189,1191,1192,1194,1195,1197,1198,1200,1201,1202,1204,1205,1207,1208,1210,1211,
    1212,1214,1215,1217,1218,1220,1221,1222,1224,1225,1227,1228,1229,1231,1232,1233,
    1235,1236,1238,1239,1240,1242,1243,1244,1246,1247,1248,1250,1251,1252,1254,1255,
    1256,1258,1259,1260,1262,1263,1264,1265,1267,1268,1269,1271,1272,1273,1274,1276,
    1277,1278,1279,1281,1282,1283,1284,1286,1287,1288,1289,1291,1292,1293,1294,1295,
    1297,1298,1299,1300,1301,1302,1304,1305,1306,1307,1308,1310,1311,1312,1313,1314,
    1315,1316,1317,1319,1320,1321,1322,1323,1324,1325,1326,1327,1329,1330,1331,1332,
    1333,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1347,1348,1349,
    1350,1351,1352,1353,1354,1355,1356,1357,1357,1358,1359,1360,1361,1362,1363,1364,
    1365,1366,1367,1368,1369,1370,1371,1372,1373,1373,1374,1375,1376,1377,1378,1379,
    1380,1381,1381,1382,1383,1384,1385,1386,1387,1387,1388,1389,1390,1391,1391,1392,
    1393,1394,1395,1396,1396,1397,1398,1399,1399,1400,1401,1402,1402,1403,1404,1405,
    1405,1406,1407,1408,1408,1409,1410,1410,1411,1412,1413,1413,1414,1415,1415,1416,
    1417,1417,1418,1419,1419,1420,1421,1421,1422,1422,1423,1424,1424,1425,1425,1426,
    1427,1427,1428,1428,1429,1430,1430,1431,1431,1432,1432,1433,1433,1434,1434,1435,
    1435,1436,1437,1437,1438,1438,1439,1439,1439,1440,1440,1441,1441,1442,1442,1443,
    1443,1444,1444,1444,1445,1445,1446,1446,1447,1447,1447,1448,1448,1449,1449,1449,
    1450,1450,1450,1451,1451,1451,1452,1452,1452,1453,1453,1453,1454,1454,1454,1455,
    1455,1455,1456,1456,1456,1456,1457,1457,1457,1457,1458,1458,1458,1458,1459,1459,
    1459,1459,1459,1460,1460,1460,1460,1460,1461,1461,1461,1461,1461,1461,1462,1462,
    1462,1462,1462,1462,1462,1463,1463,1463,1463,1463,1463,1463,1463,1463,1463,1463,
    1464,1464,1464,1464,1464,1464,1464,1464,1464,1464,1464,1464,1464,1464,1464,1464,
    1464,1464,1464,1464,1464,1464,1464,1464,1464,1464,1464,1464,1463,1463,1463,1463,
    1463,1463,1463,1463,1463,1463,1463,1462,1462,1462,1462,1462,1462,1462,1461,1461,
    1461,1461,1461,1461,1460,1460,1460,1460,1460,1459,1459,1459,1459,1459,1458,1458,
    1458,1458,1457,1457,1457,1457,1456,1456,1456,1456,1455,1455,1455,1454,1454,1454,
    1453,1453,1453,1452,1452,1452,1451,1451,1451,1450,1450,1450,1449,1449,1449,1448,
    1448,1447,1447,1447,1446,1446,1445,1445,1444,1444,1444,1443,1443,1442,1442,1441,
    1441,1440,1440,1439,1439,1439,1438,1438,1437,1437,1436,1435,1435,1434,1434,1433,
    1433,1432,1432,1431,1431,1430,1430,1429,1428,1428,1427,1427,1426,1425,1425,1424,
    1424,1423,1422,1422,1421,1421,1420,1419,1419,1418,1417,1417,1416,1415,1415,1414,
    1413,1413,1412,1411,1410,1410,1409,1408,1408,1407,1406,1405,1405,1404,1403,1402,
    1402,1401,1400,1399,1399,1398,1397,1396,1396,1395,1394,1393,1392,1391,1391,1390,
    1389,1388,1387,1387,1386,1385,1384,1383,1382,1381,1381,1380,1379,1378,1377,1376,
    1375,1374,1373,1373,1372,1371,1370,1369,1368,1367,1366,1365,1364,1363,1362,1361,
    1360,1359,1358,1357,1357,1356,1355,1354,1353,1352,1351,1350,1349,1348,1347,1345,
    1344,1343,1342,1341,1340,1339,1338,1337,1336,1335,1334,1333,1332,1331,1330,1329,
    1327,1326,1325,1324,1323,1322,1321,1320,1319,1317,1316,1315,1314,1313,1312,1311,
    1310,1308,1307,1306,1305,1304,1302,1301,1300,1299,1298,1297,1295,1294,1293,1292,
    1291,1289,1288,1287,1286,1284,1283,1282,1281,1279,1278,1277,1276,1274,1273,1272,
    1271,1269,1268,1267,1265,1264,1263,1262,1260,1259,1258,1256,1255,1254,1252,1251,
    1250,1248,1247,1246,1244,1243,1242,1240,1239,1238,1236,1235,1233,1232,1231,1229,
    1228,1227,1225,1224,1222,1221,1220,1218,1217,1215,1214,1212,1211,1210,1208,1207,
    1205,1204,1202,1201,1200,1198,1197,1195,1194,1192,1191,1189,1188,1186,1185,1183,
    1182,1180,1179,1177,1176,1174,1173,1171,1170,1168,1167,1165,1164,1162,1161,1159,
    1158,1156,1155,1153,1151,1150,1148,1147,1145,1144,1142,1140,1139,1137,1136,1134,
    1133,1131,1129,1128,1126,1125,1123,1121,1120,1118,1117,1115,1113,1112,1110,1109,
    1107,1105,1104,1102,1100,1099,1097,1095,1094,1092,1090,1089,1087,1085,1084,1082,
    1080,1079,1077,1075,1074,1072,1070,1069,1067,1065,1064,1062,1060,1059,1057,1055,
    1053,1052,1050,1048,1047,1045,1043,1041,1040,1038,1036,1035,1033,1031,1029,1028,
    1026,1024,1022,1021,1019,1017,1015,1014,1012,1010,1008,1007,1005,1003,1001, 999,
     998, 996, 994, 992, 991, 989, 987, 985, 983, 982, 980, 978, 976, 974, 973, 971,
     969, 967, 965, 964, 962, 960, 958, 956, 955, 953, 951, 949, 947, 945, 944, 942,
     940, 938, 936, 934, 933, 931, 929, 927, 925, 923, 921, 920, 918, 916, 914, 912,
     910, 908, 907, 905, 903, 901, 899, 897, 895, 894, 892, 890, 888, 886, 884, 882,
     880, 879, 877, 875, 873, 871, 869, 867, 865, 864, 862, 860, 858, 856, 854, 852,
     850, 848, 846, 845, 843, 841, 839, 837, 835, 833, 831, 829, 827, 826, 824, 822,
     820, 818, 816, 814, 812, 810, 808, 806, 804, 803, 801, 799, 797, 795, 793, 791,
     789, 787, 785, 783, 781, 780, 778, 776, 774, 772, 770, 768, 766, 764, 762, 760,
     758, 756, 754, 753, 751, 749, 747, 745, 743, 741, 739, 737, 735, 733, 731, 729,
     727, 725, 723, 722, 720, 718, 716, 714, 712, 710, 708, 706, 704, 702, 700, 698,
     696, 694, 693, 691, 689, 687, 685, 683, 681, 679, 677, 675, 673, 671, 669, 667,
     665, 663, 662, 660, 658, 656, 654, 652, 650, 648, 646, 644, 642, 640, 638, 636,
     634, 633, 631, 629, 627, 625, 623, 621, 619, 617, 615, 613, 611, 609, 607, 606,
     604, 602, 600, 598, 596, 594, 592, 590, 588, 586, 584, 583, 581, 579, 577, 575,
     573, 571, 569, 567, 565, 563, 562, 560, 558, 556, 554, 552, 550, 548, 546, 544,
     543, 541, 539, 537, 535, 533, 531, 529, 527, 525, 524, 522, 520, 518, 516, 514,
     512, 510, 509, 507, 505, 503, 501, 499, 497, 496, 494, 492, 490, 488, 486, 484,
     482, 481, 479, 477, 475, 473, 471, 470, 468, 466, 464, 462, 460, 459, 457, 455,
     453, 451, 449, 448, 446, 444, 442, 440, 438, 437, 435, 433, 431, 429, 428, 426,
     424, 422, 420, 419, 417, 415, 413, 411, 410, 408, 406, 404, 403, 401, 399, 397,
     395, 394, 392, 390, 388, 387, 385, 383, 381, 380, 378, 376, 374, 373, 371, 369,
     368, 366, 364, 362, 361, 359, 357, 355, 354, 352, 350, 349, 347, 345, 344, 342,
     340, 338, 337, 335, 333, 332, 330, 328, 327, 325, 323, 322, 320, 318, 317, 315,
     313, 312, 310, 309, 307, 305, 304, 302, 300, 299, 297, 295, 294, 292, 291, 289,
     287, 286, 284, 283, 281, 279, 278, 276, 275, 273, 272, 270, 268, 267, 265, 264,
     262, 261, 259, 258, 256, 255, 253, 251, 250, 248, 247, 245, 244, 242, 241, 239,
     238, 236, 235, 233, 232, 230, 229, 227, 226, 225, 223, 222, 220, 219, 217, 216,
     214, 213, 211, 210, 209, 207, 206, 204, 203, 202, 200, 199, 197, 196, 195, 193,
     192, 190, 189, 188, 186, 185, 184, 182, 181, 180, 178, 177, 176, 174, 173, 172,
     170, 169, 168, 166, 165, 164, 162, 161, 160, 159, 157, 156, 155, 153, 152, 151,
     150, 148, 147, 146, 145, 143, 142, 141, 140, 139, 137, 136, 135, 134, 133, 131,
     130, 129, 128, 127, 126, 124, 123, 122, 121, 120, 119, 118, 116, 115, 114, 113,
     112, 111, 110, 109, 108, 106, 105, 104, 103, 102, 101, 100,  99,  98,  97,  96,
      95,  94,  93,  92,  91,  90,  89,  88,  87,  86,  85,  84,  83,  82,  81,  80,
      79,  78,  77,  76,  75,  74,  73,  72,  72,  71,  70,  69,  68,  67,  66,  65,
      64,  64,  63,  62,  61,  60,  59,  59,  58,  57,  56,  55,  54,  54,  53,  52,
      51,  50,  50,  49,  48,  47,  47,  46,  45,  44,  44,  43,  42,  42,  41,  40,
      39,  39,  38,  37,  37,  36,  35,  35,  34,  33,  33,  32,  32,  31,  30,  30,
      29,  28,  28,  27,  27,  26,  26,  25,  24,  24,  23,  23,  22,  22,  21,  21,
      20,  20,  19,  19,  18,  18,  17,  17,  16,  16,  15,  15,  15,  14,  14,  13,
      13,  12,  12,  12,  11,  11,  10,  10,  10,   9,   9,   9,   8,   8,   8,   7,
       7,   7,   6,   6,   6,   6,   5,   5,   5,   4,   4,   4,   4,   4,   3,   3,
       3,   3,   2,   2,   2,   2,   2,   2,   1,   1,   1,   1,   1,   1,   1,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   1,   1,   1,   1,   1,   1,   1,   2,   2,   2,   2,   2,   2,   3,   3,
       3,   3,   4,   4,   4,   4,   5,   5,   5,   5,   6,   6,   6,   7,   7,   7,
       8,   8,   8,   9,   9,   9,  10,  10,  10,  11,  11,  12,  12,  13,  13,  13,
      14,  14,  15,  15,  16,  16,  17,  17,  18,  18,  19,  19,  20,  20,  21,  21,
      22,  23,  23,  24,  24,  25,  26,  26,  27,  27,  28,  29,  29,  30,  31,  31,
      32,  33,  33,  34,  35,  36,  36,  37,  38,  39,  39,  40,  41,  42,  42,  43,
      44,  45,  46,  47,  47,  48,  49,  50,  51,  52,  53,  53,  54,  55,  56,  57,
      58,  59,  60,  61,  62,  63,  64,  65,  66,  67,  68,  69,  70,  71,  72,  73,
      74,  75,  76,  77,  78,  79,  80,  82,  83,  84,  85,  86,  87,  88,  90,  91,
      92,  93,  94,  95,  97,  98,  99, 100, 102, 103, 104, 105, 107, 108, 109, 110,
     112, 113, 114, 116, 117, 118, 120, 121, 123, 124, 125, 127, 128, 130, 131, 132,
     134, 135, 137, 138, 140, 141, 143, 144, 146, 147, 149, 150, 152, 153, 155, 156,
     158, 159, 161, 163, 164, 166, 167, 169, 171, 172, 174, 176, 177, 179, 181, 182,
     184, 186, 187, 189, 191, 193, 194, 196, 198, 200, 201, 203, 205, 207, 209, 210,
     212, 214, 216, 218, 220, 222, 223, 225, 227, 229, 231, 233, 235, 237, 239, 241,
     243, 245, 247, 249, 251, 253, 255, 257, 259, 261, 263, 265, 267, 269, 271, 273,
     275, 277, 279, 281, 284, 286, 288, 290, 292, 294, 296, 299, 301, 303, 305, 307,
     310, 312, 314, 316, 319, 321, 323, 325, 328, 330, 332, 335, 337, 339, 342, 344,
     346, 349, 351, 354, 356, 358, 361, 363, 366, 368, 370, 373, 375, 378, 380, 383,
     385, 388, 390, 393, 395, 398, 400, 403, 406, 408, 411, 413, 416, 418, 421, 424,
     426, 429, 432, 434, 437, 440, 442, 445, 448, 450, 453, 456, 458, 461, 464, 467,
     469, 472, 475, 478, 481, 483, 486, 489, 492, 495, 498, 500, 503, 506, 509, 512,
     515, 518, 521, 524, 526, 529, 532, 535, 538, 541, 544, 547, 550, 553, 556, 559,
     562, 565, 568, 571, 574, 578, 581, 584, 587, 590, 593, 596, 599, 602, 606, 609,
     612, 615, 618, 621, 625, 628, 631, 634, 637, 641, 644, 647, 650, 654, 657, 660,
     664, 667, 670, 674, 677, 680, 684, 687, 690, 694, 697, 700, 704, 707, 711, 714,
     717, 721, 724, 728, 731, 735, 738, 742, 745, 749, 752, 756, 759, 763, 766, 770,
     773, 777, 781, 784, 788, 791, 795, 799, 802, 806, 810, 813, 817, 821, 824, 828,
     832, 835, 839, 843, 846, 850, 854, 858, 861, 865, 869, 873, 877, 880, 884, 888,
     892, 896, 899, 903, 907, 911, 915, 919, 923, 927, 930, 934, 938, 942, 946, 950,
     954, 958, 962, 966, 970, 974, 978, 982, 986, 990, 994, 998,1002,1006,1010,1014,
    1018,1022,1027,1031,1035,1039,1043,1047,1051,1055,1060,1064,1068,1072,1076,1081,
    1085,1089,1093,1097,1102,1106,1110,1114,1119,1123,1127,1132,1136,1140,1144,1149,
    1153,1157,1162,1166,1171,1175,1179,1184,1188,1192,1197,1201,1206,1210,1215,1219,
    1223,1228,1232,1237,1241,1246,1250,1255,1259,1264,1268,1273,1278,1282,1287,1291,
    1296,1300,1305,1310,1314,1319,1323,1328,1333,1337,1342,1347,1351,1356,1361,1365,
    1370,1375,1380,1384,1389,1394,1398,1403,1408,1413,1418,1422,1427,1432,1437,1442,
    1446,1451,1456,1461,1466,1471,1475,1480,1485,1490,1495,1500,1505,1510,1515,1520,
    1524,1529,1534,1539,1544,1549,1554,1559,1564,1569,1574,1579,1584,1589,1594,1599,
    1604,1609,1615,1620,1625,1630,1635,1640,1645,1650,1655,1660,1666,1671,1676,1681,
    1686,1691,1697,1702,1707,1712,1717,1723,1728,1733,1738,1743,1749,1754,1759,1764,
    1770,1775,1780,1786,1791,1796,1802,1807,1812,1818,1823,1828,1834,1839,1844,1850,
    1855,1860,1866,1871,1877,1882,1887,1893,1898,1904,1909,1915,1920,1926,1931,1937,
    1942,1948,1953,1959,1964,1970,1975,1981,1986,1992,1997,2003,2008,2014,2020,2025,
    2031,2036,2042,2048,2053,2059,2064,2070,2076,2081,2087,2093,2098,2104,2110,2115,
    2121,2127,2132,2138,2144,2150,2155,2161,2167,2173,2178,2184,2190,2196,2201,2207,
    2213,2219,2225,2230,2236,2242,2248,2254,2259,2265,2271,2277,2283,2289,2295,2300,
    2306,2312,2318,2324,2330,2336,2342,2348,2354,2360,2366,2371,2377,2383,2389,2395,
    2401,2407,2413,2419,2425,2431,2437,2443,2449,2455,2461,2467,2473,2479,2486,2492,
    2498,2504,2510,2516,2522,2528,2534,2540,2546,2552,2559,2565,2571,2577,2583,2589,
    2595,2602,2608,2614,2620,2626,2632,2639,2645,2651,2657,2663,2670,2676,2682,2688,
    2694,2701,2707,2713,2719,2726,2732,2738,2745,2751,2757,2763,2770,2776,2782,2789,
    2795,2801,2807,2814,2820,2826,2833,2839,2846,2852,2858,2865,2871,2877,2884,2890,
    2896,2903,2909,2916,2922,2928,2935,2941,2948,2954,2961,2967,2973,2980,2986,2993,
    2999,3006,3012,3019,3025,3032,3038,3045,3051,3058,3064,3071,3077,3084,3090,3097,
    3103,3110,3116,3123,3129,3136,3142,3149,3156,3162,3169,3175,3182,3188,3195,3202,
    3208,3215,3221,3228,3235,3241,3248,3255,3261,3268,3274,3281,3288,3294,3301,3308,
    3314,3321,3328,3334,3341,3348,3354,3361,3368,3374,3381,3388,3394,3401,3408,3415,
    3421,3428,3435,3441,3448,3455,3462,3468,3475,3482,3489,3495,3502,3509,3516,3522,
    3529,3536,3543,3549,3556,3563,3570,3577,3583,3590,3597,3604,3611,3617,3624,3631,
    3638,3645,3652,3658,3665,3672,3679,3686,3693,3699,3706,3713,3720,3727,3734,3741,
    3747,3754,3761,3768,3775,3782,3789,3796,3802,3809,3816,3823,3830,3837,3844,3851,
    3858,3865,3871,3878,3885,3892,3899,3906,3913,3920,3927,3934,3941,3948,3955,3962,
    3968,3975,3982,3989,3996,4003,4010,4017,4024,4031,4038,4045,4052,4059,4066,4073,
    4080,4087,4094,4101,4108,4115,4122,4129,4136,4143,4150,4157,4164,4171,4178,4185,
    4192,4199,4206,4213,4220,4227,4234,4241,4248,4255,4262,4269,4276,4283,4290,4297,
    4304,4311,4318,4326,4333,4340,4347,4354,4361,4368,4375,4382,4389,4396,4403,4410,
    4417,4424,4431,4438,4446,4453,4460,4467,4474,4481,4488,4495,4502,4509,4516,4523,
    4530,4538,4545,4552,4559,4566,4573,4580,4587,4594,4601,4608,4616,4623,4630,4637,
    4644,4651,4658,4665,4672,4679,4687,4694,4701,4708,4715,4722,4729,4736,4743,4750,
    4758,4765,4772,4779,4786,4793,4800,4807,4814,4822,4829,4836,4843,4850,4857,4864,
    4871,4878,4886,4893,4900,4907,4914,4921,4928,4935,4943,4950,4957,4964,4971,4978,
    4985,4992,
};

#endif

fast_foc_struct motor_left_foc_driver;                                          // 定义左侧电机的 FAST_FOC 结构体

fast_foc_struct motor_right_foc_driver;                                         // 定义右侧电机的 FAST_FOC 结构体        



//-------------------------------------------------------------------------------------------------------------------
// 函数简介     FAST_FOC 查表计算函数
// 参数说明     fast_foc_pointer      FAST_FOC 参数结构体
// 参数说明     now_encoder_data      当前的磁编码器数值  无需处理 原始数据即可
// 参数说明     output_duty_max       当前需要输出的占空比
// 参数说明     traction_angle        当前的牵引角度
// 返回参数     void  
// 使用示例     fast_foc_calculate(&motor_left_foc_driver,                                  // FAST-FOC 计算 三相输出值        
//                                  motor_left.menc15a_value_now, 
//                                  motor_left.motor_duty > 0 ? motor_left.motor_duty : -motor_left.motor_duty, 
//                                  motor_left.motor_duty > 0 ? motor_left.motor_control_angle : -motor_left.motor_control_angle);  
// 备注信息     
//-------------------------------------------------------------------------------------------------------------------
void fast_foc_calculate(fast_foc_struct *fast_foc_pointer, int32 now_encoder_data, float output_duty_max, int32 traction_angle)
{
    int32 encoder_temp = 0;                                                     // 定义磁编码器数据临时变量
    
    int32 location_temp_a = 0;                                                  // 定义三相输出位置临时变量
    int32 location_temp_b = 0;
    int32 location_temp_c = 0;

    if(fast_foc_pointer->motor_rotation_direction == -1)                        // 如果方向为反向 则将编码器数据也反相
    {
        now_encoder_data = fast_foc_pointer->encoder_max_data - now_encoder_data;
    }
    
    encoder_temp = now_encoder_data - fast_foc_pointer->motor_zero_location + fast_foc_pointer->calculate_value.encoder_pole_pairs * traction_angle / 360;      // 拟合位置   当前编码器位置 - 零点 + 牵引角
    
    if(encoder_temp <  0)                                                       // 判断是否超出最大值范围        
    {
        encoder_temp += fast_foc_pointer->encoder_max_data;             
    }
    if(encoder_temp >= fast_foc_pointer->encoder_max_data)
    {
        encoder_temp -= fast_foc_pointer->encoder_max_data;
    }
    
    encoder_temp = encoder_temp % fast_foc_pointer->calculate_value.encoder_pole_pairs; // 计算电角度位置
    
    encoder_temp = (uint32)((float)encoder_temp / fast_foc_pointer->calculate_value.encoder_proportion); // 计算编码器数据缩放 实际值缩放到查表的大小
    
    location_temp_a = (int32)encoder_temp;                                      // 获取A相查表位置
    
    location_temp_b = (int32)encoder_temp - FAST_FOC_PHASE_OFFSET;              // 获取B相查表位置
    
    while(location_temp_b < 0)                                                  // 判断是否超出最大值范围        
    {
        location_temp_b += FAST_FOC_ARRAY_LENGTH;    
    }
    while(location_temp_b >= FAST_FOC_ARRAY_LENGTH) 
    {
        location_temp_b -= FAST_FOC_ARRAY_LENGTH;
    }

    location_temp_c = (int32)encoder_temp + FAST_FOC_PHASE_OFFSET;              // 获取C相查表位置
    
    while(location_temp_c < 0)                                                  // 判断是否超出最大值范围  
    {
        location_temp_c += FAST_FOC_ARRAY_LENGTH;
    }
    while(location_temp_c >= FAST_FOC_ARRAY_LENGTH)
    {
        location_temp_c -= FAST_FOC_ARRAY_LENGTH;
    }
    
    
    fast_foc_pointer->ouput_duty[0] = foc_output_array[location_temp_a];        // 读取A相占空比
    
    fast_foc_pointer->ouput_duty[1] = foc_output_array[location_temp_b];        // 读取B相占空比
    
    fast_foc_pointer->ouput_duty[2] = foc_output_array[location_temp_c];        // 读取C相占空比
    
    fast_foc_pointer->ouput_duty[0] = (uint16)((float)fast_foc_pointer->ouput_duty[0] * fast_foc_pointer->calculate_value.duty_proportion * output_duty_max);   // A相占空比缩放并限幅
    
    fast_foc_pointer->ouput_duty[1] = (uint16)((float)fast_foc_pointer->ouput_duty[1] * fast_foc_pointer->calculate_value.duty_proportion * output_duty_max);   // B相占空比缩放并限幅
    
    fast_foc_pointer->ouput_duty[2] = (uint16)((float)fast_foc_pointer->ouput_duty[2] * fast_foc_pointer->calculate_value.duty_proportion * output_duty_max);   // C相占空比缩放并限幅
}


//-------------------------------------------------------------------------------------------------------------------
// 函数简介     FAST_FOC 初始化函数
// 参数说明     fast_foc_pointer      FAST_FOC 参数结构体
// 参数说明     encoder_max_data      当前的磁编码器的采样最大值 比如15位精度 则填写 32767
// 参数说明     duty_max_data         当前定时器输出的三相PWM最大周期
// 参数说明     motor_pole_pairs      当前电机的极对数
// 参数说明     zero_location         当前电机的零点位置
// 参数说明     rotation_direction    当前电机的旋转方向
// 返回参数     void  
// 使用示例     fast_foc_init(&motor_right_foc_driver, ENCODER_PRECISION, OUTPUT_DUTY_MAX, motor_left.pole_pairs,  motor_left.zero_location,  motor_left.rotation_direction );     // 左侧电机 FAST_FOC 功能初始化
// 备注信息     
//-------------------------------------------------------------------------------------------------------------------
void fast_foc_init(fast_foc_struct *fast_foc_pointer, int32 encoder_max_data, int32 duty_max_data, uint32 motor_pole_pairs, int32 zero_location, int32 rotation_direction)
{
    fast_foc_pointer->encoder_max_data          = encoder_max_data;             // 保存当前磁编码器的最大值 
    
    fast_foc_pointer->duty_max_data             = duty_max_data;                // 保存当前输出占空比的最大值 
    
    fast_foc_pointer->motor_pole_pairs          = motor_pole_pairs;             // 保存当前电机的极对数
    
    fast_foc_pointer->motor_zero_location       = zero_location;                // 保存当前电机的零点位置
    
    fast_foc_pointer->motor_rotation_direction  = rotation_direction;           // 保存当前电机的旋转方向
    
    fast_foc_pointer->calculate_value.encoder_pole_pairs = encoder_max_data / motor_pole_pairs;                 // 计算当前电机一圈电角度对应的磁编码器数值范围
    
    fast_foc_pointer->calculate_value.encoder_proportion = (float)fast_foc_pointer->calculate_value.encoder_pole_pairs / (float)FAST_FOC_ARRAY_LENGTH;  // 计算当前电机一圈电角度对应查表数组的缩放比例
    
    fast_foc_pointer->calculate_value.duty_proportion    = (float)duty_max_data / (float)FAST_FOC_DUTY_MAX;     // 计算当前电机的最大占空比与查表数组的缩放比例             
}


















